Results 1 to 2 of 2

Thread: Rendering issues with QGraphicsProxyWidget

  1. #1
    Join Date
    Jan 2008
    Location
    Vancouver, Canada
    Posts
    54
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Rendering issues with QGraphicsProxyWidget

    Hello,

    I have created subclass of a QGroupBox that contains several widgets, such as two QSliders, QLabels, QLineEdits and a single QGraphicsView (which only draws 3 QGraphicsLineItems). The form was created using Qt Designer.

    When the value of the QSlider changes, the QGraphcsView updates, and the LineEdits change to reflect the value of the slider. The class is added to a QGraphicsProxyWidget, shown in another QGraphicsView. Up until now, this has worked well.

    Today, I wanted to change the colour of the groove in the QSliders. I want a gradient that changes based on the values of the other slider. I implemented this using a stylesheet (although if you have an alternative, I would LOVE to hear it!), which means updating the stylesheet everytime the value is changed. It works great when I add the gradient to one QSlider, but as soon as I apply it to the second QSlider, the various text in the QGroupBox renders incorrectly. I will attach an example of this problem. The example was taken at one time, the top text renders correctly, but the bottom appears as squares. At first, I thought it might be a layout problem, but changing the layout doesn't fix it (although different texts do not render). The gradient of one QSlider is calculated on the value of the other QSlider.

    I should note that one QLineEdit, one QLabel and the text for a QCheckBox do not render correctly, everything else does.

    I am using Windows 7, Qt Creator 2.5.2 and Qt 4.8.2.

    Thank you very much,

    ABQGraphicsProxyWidgetTextError.png

  2. #2
    Join Date
    Jan 2008
    Location
    Vancouver, Canada
    Posts
    54
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Rendering issues with QGraphicsProxyWidget

    I haven't come up with a proper solution for this, but for now I have taken the QGraphicsProxyWidget out of the QGraphicsScene and just made it a frameless widget on top. This seems like a poor solution, but it solves the text redering problems as well as another rendering problem I didn't mention involving a border-image style sheet and a qpushbutton

Similar Threads

  1. Arabic text rendering; issues with parentheses
    By TropicalPenguin in forum Qt Programming
    Replies: 4
    Last Post: 10th September 2013, 09:53
  2. QTextEdit html rendering issues
    By haldrik in forum Qt Programming
    Replies: 6
    Last Post: 17th July 2012, 07:35
  3. HTML Rendering issues when webview transparency enabled
    By Anil V in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 15th June 2012, 07:38
  4. Mac OS QtWebKit CSS3 rendering issues
    By Chirieac in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2012, 20:05
  5. Replies: 0
    Last Post: 30th November 2008, 16:59

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.