Results 1 to 17 of 17

Thread: QTextEdit -> add Text

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTextEdit -> add Text

    Yes, a scroll bar should appear by default as needed.

    PS. You can extremely easily verify it with only a few lines of code:
    Qt Code:
    1. // main.cpp
    2. #include <QtGui>
    3. int main(int argc, char* argv[])
    4. {
    5. QApplication a(argc, argv);
    6. t.show();
    7. return a.exec();
    8. }
    To copy to clipboard, switch view to plain text mode 
    Then just type in the magic combo
    qmake -project
    qmake
    make
    ./app
    ...and start typing to see whether a scroll bar appears. In the end it will take less time to test such things than to post a question on the forums.
    J-P Nurmi

  2. #2
    Join Date
    Dec 2007
    Posts
    33
    Thanks
    7
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QTextEdit -> add Text

    true

    But then again i am asking myself, why my current QTextEdit no longer displays its scrollbars.

    Could that be related with my layout and my defined size of the object itself ?


    EDIT: solved
    i have to damn myself. Actually i am working with a fix window size (which was changed lately) and the QTextEdit had a fix sized too....which i forgot to change too during that resizing action in my source.


    guess best thing is not to work with fixed sizes, if i am not forced too.


    Thanks again to all helping people inhere.
    Last edited by ape; 19th December 2007 at 14:49.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTextEdit -> add Text

    Quote Originally Posted by ape View Post
    guess best thing is not to work with fixed sizes, if i am not forced too.
    Definitely. Not everyone has same resolution. A fixed size of a window/control might be completely inappropriate for somebody else. Fixed sizes will also make localization unnecessarily hard. Imagine that same widget should have different textual content depending on the chosen language. Very easy with flexible layouts, a pain with fixed sizes.

    Thanks again to all helping people inhere.
    You're welcome.
    J-P Nurmi

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Problem pasting text into a QTextEdit
    By Spockmeat in forum Qt Programming
    Replies: 8
    Last Post: 14th March 2009, 14:36
  3. Replies: 3
    Last Post: 20th November 2007, 07:03
  4. How to get text of last line only in QTextEdit?
    By rajesh in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2006, 13:37
  5. QTextEdit API questions (plain text)
    By Gaspar in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 06:03

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.