Results 1 to 4 of 4

Thread: visible text of textedit

  1. #1
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default visible text of textedit

    Hi,

    I'm having a lot of trouble finding a way to show the visible text of a qtextedit on a qlabel that I use as preview.
    In my application I have a qtextedit and a qlabel in a horizontal layout. I use the textedit to put text in that is to be formatted as html. Every time the text changes of the textedit I call a function called setPreview() wich shows the text of the textEdit on the label. The problem arises when the text is too big to fit in the textedit. Then the textedit gets scrollpanes, but when I scroll the text the preview remains the same. So I was thinking of a way to get to the visible text in the textedit to show it in the preview.
    Hope it doesn't get too confusing

    Reginald

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: visible text of textedit

    Maybe you should use another QTextEdit then? You can make it read-only using QTextEdit::setReadOnly().

  3. #3
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: visible text of textedit

    That is no option for this qtextedit as it serves as a inputwidget for making up html, a kind of dreamweaver code panel. The user should be able to change the text on the qtextedit.

    Thanks for replying

  4. #4
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: visible text of textedit

    ... or did you mean I should use another qtextedit as previewwidget? ... I might try that.. thanks

    Regix

Similar Threads

  1. widget for text AND buttons
    By nongentesimus in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 14:43
  2. Setting text color on QLabel
    By Yorma in forum Newbie
    Replies: 11
    Last Post: 15th June 2006, 08:25
  3. QTextEdit API questions (plain text)
    By Gaspar in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 07:03
  4. How do I find out which widgets/canvas items are visible?
    By Tommytrojan in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 14:22

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.