PDA

View Full Version : Embed a QFrame in MainWindow and fix its position and width (QtDesigner)



Prx3k
10th July 2012, 15:07
Hi everyone !

I'm using QtDesigner for the first time in my life, and I enjoy it so far :). However, I'm currently facing a problem. I think I won't be the first asking that, but I really didn't know what I should look for to match my problem, so please allow me to ask my question. Here is my current scheme :

7974

The thing I would like to do is my QFrame to be "stuck" to the right side of my Main Window, so when I expand my Main Window, the QFrame follows (currently, it's not the case, the QFrame stays in its position). And then, I would like to my QFrame to have a fixed width, so when I reduce my Main Window "horizontally", the QFrame remain inchanged.

If you have any idea, I would be very happy.

Thanks everyone and have a nice day !

high_flyer
10th July 2012, 15:19
The thing I would like to do is my QFrame to be "stuck" to the right side of my Main Window, so when I expand my Main Window, the QFrame follows (currently, it's not the case, the QFrame stays in its position).
Use a layout.
Play with the layouts in designer to get the hang of it.


And then, I would like to my QFrame to have a fixed width, so when I reduce my Main Window "horizontally", the QFrame remain inchanged.
If you look at the properties of your frame on the right hand side in designer, you will see the geometry settings, where you can set various site and geometry settings, as well as size policies.
If any of these properties are not clear, try the documentation - if then its still not clear, ask here.