Bug when customizing QPushButton?
-
wrote on 25 Nov 2011, 16:18 last edited by
Folks -
I am customizing QPushButton widgets, via setting the style sheet in Designer. I have found that doing so results in the bottom half (or so) of the button becoming insensitive to mouse clicks, but only on the Mac version of Qt (4.7.4). In my case, the buttons are checkable.
The stylesheet entry for the push buttons is taken from the Qt doc example page:
http://doc.qt.nokia.com/stable/stylesheet-examples.html#customizing-qpushbutton
Which looks like this:
@
QPushButton {
border: 2px solid #8f8f91;
border-radius: 6px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde);
min-width: 80px;
}QPushButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #dadbde, stop: 1 #f6f7fa);
}QPushButton:flat {
border: none; /* no border for a flat push button */
}QPushButton:default {
border-color: navy; /* make the default button prominent */
}
@In fact, any customization results in this same problem. I can only presume this is some sort of a bug, but at this point I really need a workaround. Any ideas on what I might try would be most appreciated.
Thanks!
-
wrote on 26 Nov 2011, 15:25 last edited by
Surely looks like a bug: if I add this line
@
margin-bottom: 8px;
@Then the "hitbox" for the QPushButton is just about right. Of course it does bad things to the surrounding layout... :-(
-
wrote on 26 Nov 2011, 15:37 last edited by
Did you consider filing a bug report on "JIRA":https://bugreports.qt.nokia.com/secure/QuickSearch.jspa ?
This will help to keep of the issue. If you do file a bug report, please make sure to post a link here. -
wrote on 28 Nov 2011, 22:00 last edited by
Thanks - bug reported: https://bugreports.qt.nokia.com/browse/QTBUG-22929
4/4