QT Design Full Screen
-
Hello people,
I just started with QT Design, I have an instruction in my main.cpp to make my window full screen :
MainWindow w; w.showFullScreen(); w.show();
But I don't understand how to adapt the size of Qt design to the same size as a 1920x1080 screen, I tried several things in geometry but it doesn't work.
Result: if I create a button and put it at the edge of the Qt design window, it will be in the center in my real window. Or if I maximize the Qt design window and put the button at the edge it will no longer be visible in my final window
QT design :
Result window :
Besides if someone can tell me if there is a possibility to zoom out that would be cool ^^'
Thank you
-
@beautifulcloud
You need to select the background widget, you will see MainWindow selected in the tree view on the right.
Then the Layout menu item is available.
Or you can click on MainWindow in the tree view directly.isn't the layout already created?
the symbol "sens interdit" tells you is not ;)
-
@beautifulcloud
Salut,
It' unclear how your widgets are arranged (layout).
STP, post a screenshhot of the Designer window included the object tree panel on the right. -
Salut @mpergand,
Here is a screenshot of my interface :
Here is a screenshot of the window after compilation :
As you can see the third button added in QT Design is not displayed in the window because they are not the same size
-
@beautifulcloud
You must add a layout for the central widget:
Right-click on it then Layout->Layout vertically -
@beautifulcloud
You need to select the background widget, you will see MainWindow selected in the tree view on the right.
Then the Layout menu item is available.
Or you can click on MainWindow in the tree view directly.isn't the layout already created?
the symbol "sens interdit" tells you is not ;)
-
@mpergand
Now it seems to be more structured and more adapted to the size of the screen. My buttons are centered I will see if it is possible to put them at the bottom left while keeping this configuration
Thanks for your help :) -
-
@beautifulcloud
Right-click on the button and choose Layout alignment-> Left
then Layout alignment-> bottom -
@beautifulcloud said in QT Design Full Screen:
put them at the bottom left while keeping this configuration
You can push your button layout to the bottom-left with spacers.
One vertical spacer above the button box to push it down and one horizontal spacer right to it to push it to the left. But depends all on what else you want to add to your window.