Results 1 to 5 of 5

Thread: QTextEdit & background colors

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2007
    Posts
    3
    Thanks
    1

    Default Re: QTextEdit & background colors

    Thank you, I will try this.

    Is possible to do blinking text?.

  2. #2
    Join Date
    Aug 2007
    Posts
    3
    Thanks
    1

    Default Re: QTextEdit & background colors

    Hello,

    I try the QPalette code and it don't works. I was using setStyleSheet to set background of the Widget to black but it makes changing fonts imposible.

    The code for QPalette:
    Qt Code:
    1. QPalette palette;
    2. palette.setColor(QPalette::Window, QColor(Qt::red));
    3. textOut->setPalette(palette);
    To copy to clipboard, switch view to plain text mode 

    I changed "QPalette::Window" with "QPalette::Text" and others but it don't change text background color. I will try to explain what I need other time. I want to highlight some parts of text with different background colors. It's easy to change all widget background but I need only parts of text, the other text background must remain black.
    Is not possible with QTextEdit?.

    Thanx all

  3. #3
    Join Date
    Jan 2006
    Posts
    371
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    14
    Thanked 18 Times in 17 Posts

    Default Re: QTextEdit & background colors

    ‎Throw HTML to that widget, that can work. (will be slower tough).

Similar Threads

  1. Qt4 - QTextEdit - background color
    By impeteperry in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2009, 07:52
  2. QTextEdit with semi-transparent background
    By ber_44 in forum Qt Programming
    Replies: 6
    Last Post: 29th April 2007, 00:01
  3. Replies: 1
    Last Post: 5th April 2006, 16:44
  4. Qt Designer 4.0.1 Preview Colors
    By jtyler in forum Qt Tools
    Replies: 2
    Last Post: 14th February 2006, 15:47
  5. Rich Text Tale Vol1 : Background colors
    By fullmetalcoder in forum Qt Programming
    Replies: 37
    Last Post: 9th February 2006, 15:05

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.