qt creator9 along with qt6.4 doesnt compile WYSIWYG, not similar with preview
-
And what's different in your picture? The window icon?
-
@Christian-Ehrlicher No, The window sizes without modification by the mouse are different and if I add some widgets, their sizes also will differ.
As you see the preview window is smaller than the compiled window. the preview window is the same size as the preview window. the compiled window is larger than those two.
I'm on Windows 11. along with QT 6.4.1 and QtCreator 10.0.0 -
You show an empty widget but now talk about other stuff - please be precise!
Did you set the window size in the designer? Do oyu use layouts?
Also remember that the QtCreator might use another style than the one used when you start your app (When you select 'Preview' in QtCreator you can select the style) -
@Christian-Ehrlicher
Here is one image with some widgets. As you said Qt can use the style in the preview. How can I select that?
And moreover, I wanted the compiled one to be the same as this preview. In this picture, I have used no layouts. I have set the window size and maximum size.
-
Apart from the window size which might also change due to some coding later on I don't see a difference in the layout. Just another style as I already told you.
-
@Christian-Ehrlicher
As you see the span size of widgets is larger. Check the distance of the button text with its border.
So how can I make the compile layout like the preview layout? Where are the settings placed (I mean the address to the settings)? -
@Vahid-Ajallooeian said in qt creator9 along with qt6.4 doesnt compile WYSIWYG, not similar with preview:
So how can I make the compile layout like the preview layout?
(When you select 'Preview' in QtCreator you can select the style)
-
@Christian-Ehrlicher If you mean this view, all will have the same size as the designer, but the compiled app is larger. only some colors and effects would change.
-
@Vahid-Ajallooeian To those who encounter this issue, this is a matter of https://doc.qt.io/qt-6/highdpi.html and https://bugreports.qt.io/browse/QTBUG-110681. And I have not found how to manage it.
-
@Christian-Ehrlicher @ChrisW67 Thank you for your help. Here is an MVP of what shows the problem. Would you please tell me If I am doing layouts wrongly? Or should it be handled in other ways for high dpi management?
https://drive.google.com/file/d/1oPCpIctbh9lgRSMbFnIiTSZmLba0I3R2/view?usp=sharing -