Issue with the alignment of the form widgets
-
Hello All,
I am trying to implement the following form.
I want the widgets to be aligned when I resize the window but the elements do not get properly.
I wanted to keep the ration of the frame and the windows inside the frame to be proportional while expanding. -
Hello All,
I am trying to implement the following form.
I want the widgets to be aligned when I resize the window but the elements do not get properly.
I wanted to keep the ration of the frame and the windows inside the frame to be proportional while expanding. -
@Kira So, do you use layouts? If so can you show your code or designer (if you use designer)?
-
Hi @Kira,
what @jsulm want's to tell you is this: https://doc.qt.io/qt-5/designer-layouts.html
For a more detailed introduction please see here: https://doc.qt.io/qt-5/layout.html
Regards
-
Hi @Kira,
what @jsulm want's to tell you is this: https://doc.qt.io/qt-5/designer-layouts.html
For a more detailed introduction please see here: https://doc.qt.io/qt-5/layout.html
Regards
@jsulm @aha_1980: I'll try to be more specific.
- My central widget is having a horizontal layout and I have added two frames to it which occupies the central widget equally.
- Now I want the width of second frame to 30% the central widget and 70% to be the frame one
how can implement the following. - I understand the fact the widgets inside the child frame will get aligned when I add layout to it.
How can I implement point 1?
:)
-
@jsulm @aha_1980: I'll try to be more specific.
- My central widget is having a horizontal layout and I have added two frames to it which occupies the central widget equally.
- Now I want the width of second frame to 30% the central widget and 70% to be the frame one
how can implement the following. - I understand the fact the widgets inside the child frame will get aligned when I add layout to it.
How can I implement point 1?
:)
@Kira Take a look at https://doc.qt.io/qt-5/layout.html#stretch-factors for 2.
-
@jsulm @aha_1980: I'll try to be more specific.
- My central widget is having a horizontal layout and I have added two frames to it which occupies the central widget equally.
- Now I want the width of second frame to 30% the central widget and 70% to be the frame one
how can implement the following. - I understand the fact the widgets inside the child frame will get aligned when I add layout to it.
How can I implement point 1?
:)
-
@Kira are you saying you want something like this, which will be resized when you resize the window?
Below is the screenshot which i have implemented and tested it.
image url)
-
@Kira Take a look at https://doc.qt.io/qt-5/layout.html#stretch-factors for 2.
@jsulm said in Issue with the alignment of the form widgets:
@Kira Take a look at https://doc.qt.io/qt-5/layout.html#stretch-factors for 2.
Thanks a lot this is what I was looking for :)