Results 1 to 4 of 4

Thread: TextColor in QTextEdit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: TextColor in QTextEdit

    If you don't have any other format in the text: save the text to a QString, clear the edit and set the text with the new color. Otherwise I guess you have to loop through your text formats.

  2. #2
    Join Date
    Dec 2009
    Posts
    47
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    13

    Default Re: TextColor in QTextEdit

    Thanks. I've tried setting the StyleSheet, but it is overridden by the text formats. Saving and clearing works fine; the only other format was a base font.

Similar Threads

  1. QTextEdit
    By qoo in forum Newbie
    Replies: 6
    Last Post: 28th July 2009, 18:05
  2. QTextEdit
    By veda in forum Qt Programming
    Replies: 4
    Last Post: 11th September 2007, 07:30
  3. Replies: 1
    Last Post: 16th February 2007, 07:22
  4. QTextEdit Help Please
    By Raystorm in forum Newbie
    Replies: 8
    Last Post: 17th May 2006, 04:50
  5. QTextEdit help pls
    By munna in forum Newbie
    Replies: 2
    Last Post: 29th April 2006, 09:07

Tags for this Thread

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.