mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #419, reviewed style sheet paintEvent code
* removed for QWidget * added for QDialog http://stackoverflow.com/questions/37952348/enable-own-widget-for-stylesheet
This commit is contained in:
@@ -361,6 +361,7 @@ namespace BlackGui
|
||||
// 1) QStylePainter: modern version of
|
||||
// usedWidget->style()->drawPrimitive(element, &opt, &p, usedWidget);
|
||||
// 2) With viewport based widgets viewport has to be used
|
||||
// see http://stackoverflow.com/questions/37952348/enable-own-widget-for-stylesheet
|
||||
QAbstractScrollArea *sa = qobject_cast<QAbstractScrollArea *>(usedWidget);
|
||||
QStylePainter p(
|
||||
sa ? sa->viewport() :
|
||||
|
||||
Reference in New Issue
Block a user