Results 1 to 3 of 3

Thread: QFrame with border-radius inside QGraphicsScene

  1. #1
    Join Date
    Apr 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default QFrame with border-radius inside QGraphicsScene

    For some reason QFrame with round border gets drawn with square background in QGraphicsScene.
    It appears normally if added to other widgets using layout. Should I do something special in case of QGraphicsScene/QGraphicsView to clip background properly ?

  2. #2
    Join Date
    May 2010
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QFrame with border-radius inside QGraphicsScene

    Got the same problem with QPushButton, QWidget in general. Anyone could help?

  3. #3
    Join Date
    Sep 2009
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QFrame with border-radius inside QGraphicsScene

    you can fix this problem by setting attribute of a the widget ( QPushButton , QToolButton or any other widget which can have border-radius ) like this :

    QPushButton btn;
    btn.setAttribute(Qt::WA_NoSystemBackground,true);
    btn.setStyleSheet(".........

    Please do not forget that the widget won't have a default background anymore and you need to set the background color in your stylesheet.

Similar Threads

  1. Replies: 1
    Last Post: 8th December 2009, 13:55
  2. QGLWidget inside QGraphicsScene/View
    By h123 in forum Qt Programming
    Replies: 3
    Last Post: 10th January 2009, 09:46
  3. Replies: 2
    Last Post: 5th July 2008, 20:35
  4. QPrinter on QGraphicsScene Border Problem
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2007, 16:49
  5. Replies: 4
    Last Post: 11th July 2007, 05:21

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.