Qt Desktop Components rendering issues in Windows 7



  • I built the Qt Desktop Components for Qt 4.8.4 and I have been experiencing some rendering issues with CheckBox and RadioButton components. My machine is running Windows 7 x64 using an Aero desktop theme.

    For the RadioButton and CheckBox issues, the checked state of these components do not redraw unless you hover the control. The problem seems to happen only when going from a checked to unchecked state.

    This does seem to be related to Aero themes as the issue is not present when using a Windows Classic theme or when interacting with the Qt app in a remote desktop session. I also tried running the app with the "-graphicssystem opengl" option, but it did not help.

    Any known work-arounds or fixes to this issue?



  • No. As you know the components will be officially part of Qt 5.1 where this should no longer be an issue. If you still need a workaround in Qt 4, you could try to edit the styleitem implementation so it does not pass any widgets while drawing the checkbox. This should remove the animation, but will render correctly.



  • Awesome! I started looking at the QStyleItem implementation but was not exactly sure what to look for. I modified the QStyleItem::paint implementation for the troubled components (CheckBox, RadioButton, and Button), where no widgets are passed when drawing the control:
    @qApp->style()->drawControl(QStyle::CE_CheckBox, m_styleoption, painter, NULL);@

    Thanks again! This worked out very well with minimal code changes.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.