Toggle Window Frames (Qt::FramelessWindowHint) in Qt 5.4.1
-
Hi,
I recently switched to Qt 5.4.1 from 5.4.0.
Basically I have a QDialog window, where the user can toggle the window frames. So I add and remove the Qt::FramelessWindowHint flag.
When using Qt 5.4.1 MSVC2013 x64 on a Windows 8.1 machine this results in a wired behavior. After adding and removing the FramelessWindowHint flag, the contents of the window is off. It does not display the full contents and cuts off the included widgets on the right and bottom window edges.
I made some screenshots of a simple example. A QMainWindow including only one button. The button toggles the FramelessWindowHint flag off and on. Also re-sizing the Window does no show the full contents.
Here is what happens:
initial state picture
flag set picture
flag removed (error) pictureBest,
Markus -
Hm, did you try to hide and show the windows after you have altered the flag? Looks like some updating issue.
-
Hi,
the window gets hidden when setting this flag. I also tried hiding and showing it a few times, nothing changes.
Best,
Markus -
Hi and welcome to devnet,
Just to be sure, is this a new behavior with Qt 5.4.1 ?
-
@SGaist Yes, as far as I can tell. With Qt 5.4.0 MSVC 2013 x64 all works fine. The same package in version 5.4.1 causes trouble and cuts the window contents off.
-
Then this might be regression. You should take a look at the bug report system to see if it's something known. If not, please consider opening a new report providing a minimal compilable example that helps reproduce this behavior.
-
I am having this exact same problem with Qt 5.6.0. After seeing this thread, it's apparent that this bug has been present for several years.