Qt::WindowFullScreen - window under taskbar in MS-Windows
-
Hello,
I must bring the problem with a new topic on top once again.
Here is the minimal code to reproduce the error:void MainWindow::on_pushButton_clicked() { QDialog *dlg=new QDialog; dlg->setWindowState(Qt::WindowFullScreen); dlg->show(); }
I have check it with the latest Qt Version. 5.15.1 MSVC19-32 bit.
(Windows 10 - 2004-64 - but error is in earlier version too.)The window gets full screen size but it is under the taskbar !
In Qt 5.6.0 MSVC15-32 bit it works - the Taskbar is hidden by the window.
It is very important for me, this behavior kills my app for my customer in the pure tablet enviroment.
-
@Andy314 said in Qt::WindowFullScreen - window under taskbar in MS-Windows:
dlg->setWindowState(Qt::WindowFullScreen);
It should be
dlg->setWindowState(dlg->windowState() ^ Qt::WindowFullScreen);
as shown in https://doc.qt.io/qt-5/qwidget.html#setWindowState
-
It should be
dlg->setWindowState(dlg->windowState() ^ Qt::WindowFullScreen);
as shown in https://doc.qt.io/qt-5/qwidget.html#setWindowState
Thank you very much for this tip. Nevertheless with this correction I get the same effect as before.
-
Is it ok for you to add StaysOnTop hint? like
dlg->setWindowFlags(dlg->windowFlags() | Qt::WindowStaysOnTopHint);
QDialog does act very weirdly when showing full screen.
You may consider using a normal QWidget if it is not required to using QDialog. -
@Bonnie said in Qt::WindowFullScreen - window under taskbar in MS-Windows:
Is it ok for you to add StaysOnTop hint? like
dlg->setWindowFlags(dlg->windowFlags() | Qt::WindowStaysOnTopHint);
QDialog does act very weirdly when showing full screen.
You may consider using a normal QWidget if it is not required to using QDialog.Indeed it works ! Its good for me - thank you very much for this hint.
(I made experiments with Qt::Popup before, but this gave problems with the visibility of the virtual keyboard.)
Its an interesting way to use a QWidget. Unfortunately I made a BaseClass derived for QDialog with my standard tasks in it. Second I use the same Dialog in the desktop enviroment in a MDI-windows. -
@Andy314 said in Qt::WindowFullScreen - window under taskbar in MS-Windows:
Indeed it works !
is your issue solved? if so, please don't forget to mark your post as such! Thanks.