Results 1 to 3 of 3

Thread: Form resizes ok in Designer, not in my test app.

  1. #1
    Join Date
    Mar 2007
    Posts
    74
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Form resizes ok in Designer, not in my test app.

    I am out of now officially out ideas as to how to proceed.

    This form operates and resizes exactly how I want it when viewed in
    QT Designer.

    In a test app I create a Layout and place this form on it.

    m_Layout = new QHBoxLayout;
    m_mainGroup->setLayout(m_Layout);
    m_PolMonitorForm = new PolMonitorProperty(this);
    m_mainGroup->layout()->addWidget(m_PolMonitorForm);

    The groupBox into which I am placing it has a sizePolicy
    of Expanding,Expanding and a minimum size of 650,400.

    The control dialogs should remain at the left with the tree groupbox
    growing and expanding as the app is resized.

    Instead the control dialogs shift to the right and the tree groupbox
    resizes only in the vertical direction, with everything more or less
    staying in the center of the groupbox.

    What I am missing here!

    I've attached images from QT Designer and my test app as well as
    my ui file, although as it contains a custom control you may not be
    able to see it.


    Mark
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2006
    Posts
    79
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Form resizes ok in Designer, not in my test app.

    I can't try it out right now because i haven't the Qt Designer installed, but i think that what you need is a QSplitter ( http://doc.trolltech.com/4.3/designe...litter-layouts ).

    Another option would be a QDockWidget ( http://doc.trolltech.com/4.3/qdockwidget.html ) if you are using a QMainWindow. Both are available from the designer.
    edit: If you are using a QDockWidget, it would probably be helpful to make it dockable in the properties..
    Last edited by aMan; 30th August 2007 at 07:26.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Form resizes ok in Designer, not in my test app.

    Could you post a compilable example? What are "control dialogs" and what is the "tree groupbox"? You are using promoted widgets, so the ui you attached is practically useless...

    From what I see you should set the horizontal size policy of the tree groupbox to expanding and it's content's size policy to expanding as well.

Similar Threads

  1. Replies: 6
    Last Post: 5th July 2007, 02:00
  2. Replies: 7
    Last Post: 13th November 2006, 15:44
  3. Replies: 5
    Last Post: 10th May 2006, 00:20
  4. [QT4 & XP] QTreeView issue with Designer form
    By incapacitant in forum Newbie
    Replies: 3
    Last Post: 2nd March 2006, 17:42
  5. Replies: 4
    Last Post: 6th February 2006, 14:30

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.