Results 1 to 15 of 15

Thread: About Qt designer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    17

    Default Re: About Qt designer

    If you want to prevent the boxes from expanding vertically, restrict it with one of the properties, don't use spacers. Is just neater and easier to work with.

    It's hard to understand. How to do? If I don't add one more spacer, the QGroupBox will be compressed to a line, but it will still add two more cells.

    Can anyone help?

  2. #2
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo
    Thanks
    9
    Thanked 17 Times in 17 Posts

    Default Re: About Qt designer

    Sorry I didn't respond so quickly issues in RL.

    If you wanna do it without spacers. Just edit the minimumSize and maximumSize properties. But I use spacers like crazy ;P. The just resize the form in designer and it will fix. But yeah the spacer at the bottom of the form is forcing everything up. So when you add a new QGroupBox to the form it will make it into a single tiny thing. Just delete the spacer at the bottom and resize the form and when you are done just add another. But I don't recommand spacers because it limits stuff that shouldn't be. Especially when forms are resizeable.

    The reason for the splitting of the buttons is because the vertical sizePolicy was set to expanding. instead of fixed. So when you set it to fix it will not grown aka not have the gap between the OK and Cancel button. Oh in that little code you post. If you click on the ButtonBox and look through the properties you can see that you can add more buttons to it that way.
    Last edited by ComaWhite; 25th February 2009 at 08:28.
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  3. #3
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    17

    Default Re: About Qt designer

    Quote Originally Posted by ComaWhite View Post
    Sorry I didn't respond so quickly issues in RL.

    If you wanna do it without spacers. Just edit the minimumSize and maximumSize properties. But I use spacers like crazy ;P. The just resize the form in designer and it will fix. But yeah the spacer at the bottom of the form is forcing everything up. So when you add a new QGroupBox to the form it will make it into a single tiny thing. Just delete the spacer at the bottom and resize the form and when you are done just add another. But I don't recommand spacers because it limits stuff that shouldn't be. Especially when forms are resizeable.

    The reason for the splitting of the buttons is because the vertical sizePolicy was set to expanding. instead of fixed. So when you set it to fix it will not grown aka not have the gap between the OK and Cancel button. Oh in that little code you post. If you click on the ButtonBox and look through the properties you can see that you can add more buttons to it that way.
    Thanks!

    But that is one more problem. Compare with you example, the latter UI file i upload and do the same things with your example, but that is two cell in my Ui file, but your just one with a spacer. How I can merge my two cell into one just as you did.

    Thanks again!

  4. #4
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo
    Thanks
    9
    Thanked 17 Times in 17 Posts

    Default Re: About Qt designer

    Depending on which one. Just pull on one of the ends that you want it to go into the next column or row and just pull on it and it will span to the next column|row
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  5. The following user says thank you to ComaWhite for this useful post:

    HelloDan (25th February 2009)

  6. #5
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    17

    Default Re: About Qt designer

    Quote Originally Posted by ComaWhite View Post
    Depending on which one. Just pull on one of the ends that you want it to go into the next column or row and just pull on it and it will span to the next column|row
    Oh, Thanks sincerely! I make it!

  7. #6
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo
    Thanks
    9
    Thanked 17 Times in 17 Posts

    Default Re: About Qt designer

    That is good to know ^_^ Good job
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

Similar Threads

  1. Threads in Designer plugins
    By hvengel in forum Qt Tools
    Replies: 2
    Last Post: 3rd January 2009, 19:19
  2. Replies: 1
    Last Post: 22nd January 2007, 12:13
  3. Replies: 13
    Last Post: 15th December 2006, 11:52
  4. Designer crashes when selecting some widgets
    By gwendal in forum Qt Tools
    Replies: 4
    Last Post: 21st July 2006, 13:18
  5. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 18th May 2006, 23:28

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
  •  
Qt is a trademark of The Qt Company.