Results 1 to 4 of 4

Thread: QTextEdit wrong color

  1. #1
    Join Date
    Nov 2006
    Posts
    86
    Thanks
    6
    Thanked 14 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QTextEdit wrong color

    Ok, how come when I insert:
    <span style="background-color: #FFFF00">You
    can highlight your text any color you like.</span>

    into a QTextEdit by its insertHtml() method that the next time I insert plaintext with insertPlainText( "my text") "my text" now also has the same background color as the previous Html-inserted text? Is there some way to make QTextEdit reset to default colors before inserting plaintext?

    Paul

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTextEdit wrong color

    You can try to change it to plain text mode manually. But I'd say that this is a bug. Which Qt version are you using?

  3. #3
    Join Date
    Nov 2006
    Posts
    86
    Thanks
    6
    Thanked 14 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTextEdit wrong color

    Qt 4.3.3 open-source edition.

  4. #4
    Join Date
    Nov 2006
    Posts
    86
    Thanks
    6
    Thanked 14 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTextEdit wrong color

    This is a confirmed Trolltech bug in Qt 4.3.3
    http://trolltech.com/developer/task-...ntry&id=175454

    Paul

Similar Threads

  1. Qt4 - QTextEdit - background color
    By impeteperry in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2009, 07:52
  2. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 12:05
  3. Weird color problems related to QTextEdit and QPainter
    By Erlendhg in forum Qt Programming
    Replies: 5
    Last Post: 18th June 2007, 21:57
  4. border color is wrong with "plastique" style in Qt4.2.3
    By alfa_wu in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2007, 04:27
  5. Replies: 2
    Last Post: 9th March 2007, 23:19

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.