add swipe gesture

This commit is contained in:
xueyan hu
2022-01-18 16:40:18 +08:00
parent 61e5d547f8
commit 437423dd00
9 changed files with 215 additions and 116 deletions

View File

@@ -70,14 +70,14 @@ int main(int argc, char* argv[])
//暂时为了调试关闭锁屏
//Locker::Instance()->start();
//QObject::connect(obj, SIGNAL(touchScreen()), Locker::Instance(), SLOT(refreshTimer()));
QList<Qt::GestureType> gestures;
gestures << Qt::SwipeGesture;
w.grabGestures(gestures);
QStringList app_args = a.arguments();
int ret = 0;
if (app_args.contains("-d"))
//if (true)
{
w.debugConsoleOn();
qInstallMessageHandler(MainWindow::QMessageOutput);
@@ -91,7 +91,7 @@ int main(int argc, char* argv[])
Timer.start(1000);
thread.start();
w.showFullScreen();
DeviceManager::Default()->initDevice();
DeviceManager::Default()->initDevice();
w.requestLogin();
ret = a.exec();
@@ -100,7 +100,7 @@ int main(int argc, char* argv[])
}
else {
w.showFullScreen();
DeviceManager::Default()->initDevice();
DeviceManager::Default()->initDevice();
w.requestLogin();
ret = a.exec();
}