mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
21 lines
414 B
C++
21 lines
414 B
C++
#include "hottestwidget.h"
|
|
#include <QApplication>
|
|
|
|
//#define START_BACKGROUND
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
HotTestWidget w;
|
|
|
|
#ifdef START_BACKGROUND
|
|
auto startKey = new QHotkey(QKeySequence(Qt::MetaModifier | Qt::ControlModifier | Qt::Key_S), true, &w);
|
|
QObject::connect(startKey, &QHotkey::activated,
|
|
&w, &QWidget::show);
|
|
#else
|
|
w.show();
|
|
#endif
|
|
|
|
return a.exec();
|
|
}
|