[code] fix hide cursor procedure
This commit is contained in:
parent
46dcd609bd
commit
88f61a3c4d
@ -104,14 +104,11 @@ int main(int argc, char* argv[])
|
||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openSettings, &settingsWindow, &autoapp::ui::SettingsWindow::showFullScreen);
|
||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openConnectDialog, &connectDialog, &autoapp::ui::ConnectDialog::exec);
|
||||
|
||||
if (configuration->hasTouchScreen()) {
|
||||
OPENAUTO_LOG(info) << "[Touchdev] Hiding mouse cursor due to detection of a touch device";
|
||||
qApplication.setOverrideCursor(Qt::BlankCursor);
|
||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::toggleCursor, [&qApplication]() {
|
||||
const auto cursor = qApplication.overrideCursor()->shape() == Qt::BlankCursor ? Qt::ArrowCursor : Qt::BlankCursor;
|
||||
qApplication.setOverrideCursor(cursor);
|
||||
});
|
||||
}
|
||||
qApplication.setOverrideCursor(Qt::BlankCursor);
|
||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::toggleCursor, [&qApplication]() {
|
||||
const auto cursor = qApplication.overrideCursor()->shape() == Qt::BlankCursor ? Qt::ArrowCursor : Qt::BlankCursor;
|
||||
qApplication.setOverrideCursor(cursor);
|
||||
});
|
||||
|
||||
mainWindow.showFullScreen();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user