Closed ClementLeBihan closed 9 months ago
I'm afraid that is a Qt limitation. See the corresponding note in the docs. Maximizing the window works as expected: #1803 Note that you should remember the previous state of the display (floating or not) and restore that state.
In my side maximizing also need 4 clicks before beeing maximized. But there is the same warning about maximizing. Thank you for giving me the link, I wasn't aware of the limitation.
It says On X11, a window does not have a frame until the window manager decorates it. This happens asynchronously at some point in time after calling [QWidget::show](https://doc.qt.io/qt-5/qwidget.html#show)() and the first paint event the window receives, or it does not happen at all.
It seems to correspond the fact that I need to click 4 times on my button to see window maximizing or fullscreening.
Thanks a lot for your quick answer and for your help @rhaschke !!!
On my side maximizing also needs 4 clicks before being maximized.
I was using Qt 5.15 on Ubuntu Jammy. Maybe on Focal with Qt 5.12 it doesn't (yet) work?
That's may be the point ! Thank you @rhaschke
Hi ! I'm trying to add a fullscreen button for ImageDisplay, without success. I think it could be a good feature.
I've created a fullscreen button in the titlebar of the widget :
and implemented the updateFullScreen function :
Unfortunately, something weird happen. The first time I click, the widget start floating but not fullscreen. The second time I click, the widget doesn't move The third time I click, the widget stop floating The Fourth time I click, the widget goes fullscreen as expected.
Do you have an idea why It needs 4 clicks ? I have no idea how QtWidget works, I may forgot to call a function ...
Thank you for your help, Best regards, Clément