Results 1 to 2 of 2

Thread: Setting QGraphicsView bacground/foreground color

  1. #1
    Join Date
    Jun 2008
    Posts
    13
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Setting QGraphicsView bacground/foreground color

    Hi, I want to make entrire QGraphicsView filled with one color. I've tried setting backgroundBrush and foregroundBrush in designer but it does not change anything. QGraphicsView is still white. Could you the correct steps to do such a simple task?

  2. #2
    Join Date
    Nov 2007
    Posts
    26
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Setting QGraphicsView bacground/foreground color

    yourscene->setBackgroundBrush(Qt::black);

    yourscene->setForegroundBrush(Qt::white);

  3. The following user says thank you to robertson1 for this useful post:

    zolookas (29th July 2008)

Similar Threads

  1. how to change backgroup color, button color and shape?
    By lzha022 in forum Qt Programming
    Replies: 10
    Last Post: 16th June 2008, 22:25
  2. Setting a highlight text color for QTableWidgetItem
    By Hiba in forum Qt Programming
    Replies: 6
    Last Post: 14th December 2007, 10:51
  3. Replies: 1
    Last Post: 1st February 2007, 14:32
  4. Setting text color on QLabel
    By Yorma in forum Newbie
    Replies: 11
    Last Post: 15th June 2006, 07:25
  5. Replies: 2
    Last Post: 10th March 2006, 20:46

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.