Results 1 to 2 of 2

Thread: Embed a QFrame in MainWindow and fix its position and width (QtDesigner)

  1. #1
    Join Date
    Jul 2012
    Posts
    1
    Qt products
    Qt4

    Question Embed a QFrame in MainWindow and fix its position and width (QtDesigner)

    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 :

    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 !

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Embed a QFrame in MainWindow and fix its position and width (QtDesigner)

    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.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 0
    Last Post: 6th November 2011, 10:22
  2. Embed Qt Designer
    By emmynet in forum Qt Programming
    Replies: 5
    Last Post: 21st April 2011, 15:52
  3. Replies: 1
    Last Post: 12th April 2011, 10:53
  4. QToolBox width fixed to maximum content width
    By ghorwin in forum Qt Programming
    Replies: 0
    Last Post: 10th July 2009, 10:58
  5. How to set QTableView width to width of horizontal header?
    By martinb0820 in forum Qt Programming
    Replies: 0
    Last Post: 2nd December 2008, 21:51

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.