QT 为VideoWidget添加快捷键

 

头文件

public:

  Phonon::VideoWidget * vw;

 

 

cpp

#include <QShortcut>

 

  QShortcut *shortcut = new QShortcut(QKeySequence("ESC"), vw);

        QObject::connect(shortcut, SIGNAL(activated()), SLOT(CloseZone()));

 

        QShortcut *shortcut2 = new QShortcut(QKeySequence(Qt::Key_Enter), vw);

        QObject::connect(shortcut2, SIGNAL(activated()), SLOT(resizeZone()));

posted on 2011-03-22 17:22  风乔  阅读(561)  评论(0编辑  收藏  举报

导航