QToolButton Menu Arrow Position Issue (Windows 7)
I have some QToolButton's in tool bars, both in the main tool bar and window tool bars, that use either the QToolButton::DelayedPopup or QToolButton::InstantPopup flags. In these modes, the menu indicator (a downward pointing arrow) is integrated into the button rather than providing an explicit menu button as in the QToolButton::MenuButtonPopup mode. Functionally this works fine but on Windows 7 (and other versions?) the style fails to add extra room to the button for this indicator and ends up drawing over the buttons icon. This is not the case on either Mac OSX (10.8) or Linux (Mint 13 Maya). The images below illustrate the issue:
!http://s10.postimage.org/dmdmoxcn9/tb_mac.png(QToolButton on Mac OSX)!
Mac OSX: Gives just enough room
!http://s10.postimage.org/79yhf39l1/tb_nix.png(QToolButton on Linux Mint)!
Linux: Gives ample room
!http://s10.postimage.org/x6s5rpd8l/tb_win7.png(QToolButton on Windows 7)!
Windows 7: Note the encroachment of the arrow on the icon. With a square icon, the arrow obscures the bottom corner and gets lost.
Has anyone got any ideas how to fix this or style around the problem? All help gratefully received.
Have you had a look at "style sheets":http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qtoolbutton ?