Results 1 to 3 of 3

Thread: Changing the background color of a QGraphicsSimpleTextItem

Threaded View

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

    Default Re: Changing the background color of a QGraphicsSimpleTextItem

    subclass the paint method as you have done and inside just draw the background as you like. Afterwards just call the paint method of the base class, the simple text item in your case and all should work as you want it to.

    And may be you need to change the pen outside the paint method, but I am not sure about it.

  2. The following user says thank you to Lykurg for this useful post:

    psychocowtipper (6th May 2011)

Similar Threads

  1. changing background color in qvfb
    By John Douma in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 31st March 2011, 19:30
  2. Changing color of only one tab
    By Tiansen in forum Qt Programming
    Replies: 1
    Last Post: 7th January 2011, 04:34
  3. changing button background color
    By Tomasz in forum Newbie
    Replies: 4
    Last Post: 27th November 2010, 04:09
  4. Changing the background color of a cell in a QTableView
    By scarleton in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2010, 13:23
  5. prob with changing QLineEdit background color
    By Ahmad in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2007, 12:44

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.