Results 1 to 4 of 4

Thread: Qt Designer - how to make QTextEdit smaller than its sizeHint?

  1. #1
    Join Date
    Oct 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt Designer - how to make QTextEdit smaller than its sizeHint?

    Hello,

    What I want to do with Qt Designer is a simple form with buttons on the right side of the form, and a QTextEdit on the left side. The problem: How can I establish, that the initial Dialog looks like this:
    screenshot_packed.png
    The height of the QTextEdit is same like the height of the 3 buttons, and if the user resize the window, the 3 buttons remain in the right top corner, and the QTextEdit is growing downward.
    Thanks:
    novakk

  2. #2
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Qt Designer - how to make QTextEdit smaller than its sizeHint?

    Just use . Buttons should be in vertical layout with vertical spacer bottom-side. QTextEdit and layout with buttons place inside horizontal layout.
    Oleg Shparber

  3. #3
    Join Date
    Oct 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Designer - how to make QTextEdit smaller than its sizeHint?

    Thank you for your quick answer Oleg!
    I have tried that configuration.
    I modified the vertical sizeHint of spacer to zero, but the form will increase till the QTextEdit reaches its vertical sizeHint: 192.
    I've tired to change size policies but I cannot solve this problem.
    My result is:
    screenshot.png

    Should I include the ui file to make my problem more clear?

    NovakK

  4. #4
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Qt Designer - how to make QTextEdit smaller than its sizeHint?

    Reset all policies and hints to enable proper auto size handling.
    Oleg Shparber

Similar Threads

  1. Huge Mac .dmg files, can anything be done to make them smaller?
    By colin207 in forum Installation and Deployment
    Replies: 3
    Last Post: 10th February 2011, 08:06
  2. Replies: 0
    Last Post: 5th January 2011, 00:54
  3. Is any way to make smaller installer package
    By jay in forum Installation and Deployment
    Replies: 6
    Last Post: 30th March 2010, 11:57
  4. How to make build smaller
    By stefan in forum Installation and Deployment
    Replies: 9
    Last Post: 10th September 2008, 19:56
  5. How can I make size of QGraphicsScene smaller?
    By troorl_ua in forum Qt Programming
    Replies: 6
    Last Post: 21st April 2007, 07:56

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.