[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::openSettings, &settingsWindow, &autoapp::ui::SettingsWindow::showFullScreen);
|
||||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openConnectDialog, &connectDialog, &autoapp::ui::ConnectDialog::exec);
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::openConnectDialog, &connectDialog, &autoapp::ui::ConnectDialog::exec);
|
||||||
|
|
||||||
if (configuration->hasTouchScreen()) {
|
qApplication.setOverrideCursor(Qt::BlankCursor);
|
||||||
OPENAUTO_LOG(info) << "[Touchdev] Hiding mouse cursor due to detection of a touch device";
|
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::toggleCursor, [&qApplication]() {
|
||||||
qApplication.setOverrideCursor(Qt::BlankCursor);
|
const auto cursor = qApplication.overrideCursor()->shape() == Qt::BlankCursor ? Qt::ArrowCursor : Qt::BlankCursor;
|
||||||
QObject::connect(&mainWindow, &autoapp::ui::MainWindow::toggleCursor, [&qApplication]() {
|
qApplication.setOverrideCursor(cursor);
|
||||||
const auto cursor = qApplication.overrideCursor()->shape() == Qt::BlankCursor ? Qt::ArrowCursor : Qt::BlankCursor;
|
});
|
||||||
qApplication.setOverrideCursor(cursor);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
mainWindow.showFullScreen();
|
mainWindow.showFullScreen();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user