Results 1 to 2 of 2

Thread: TextEdit won't resize when Stretch factor set to 0

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Qt products
    Qt4 Qt5
    Thanks
    98
    Thanked 3 Times in 3 Posts

    Exclamation TextEdit won't resize when Stretch factor set to 0

    Hey guys,

    I'm using a QSplitter to divide 2 QTextEdit components.
    for some reason "mTextEditInput" won't resize when its stretch factor is set to 0.

    Qt Code:
    1. // Text edit output
    2. mTextEditOutput.setReadOnly(TRUE);
    3.  
    4. // Text edit input
    5. mTextEditInput.resize(10, 10);
    6.  
    7. splitterConversation->addWidget(&mTextEditOutput);
    8. splitterConversation->addWidget(&mTextEditInput);
    9. splitterConversation->setStretchFactor(0, 10);
    10. splitterConversation->setStretchFactor(1, 0);
    To copy to clipboard, switch view to plain text mode 

    Any suggestion?

    Thanks,
    Ben.

  2. #2
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanked 42 Times in 37 Posts

    Default Re: TextEdit won't resize when Stretch factor set to 0

    That's because the stretch factor is 0. Try setting it to a non-zero positive value.
    Save yourself some pain. Learn C++ before learning Qt.

Similar Threads

  1. visible text of textedit
    By regix in forum Qt Programming
    Replies: 3
    Last Post: 26th June 2006, 10:02
  2. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 01:32

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.