Solved Style sheet property for QDial
-
I am trying to add CSS for QDial in the .ui file.
I have added some basic stylesheets (like background-color) but it doesn't reflects on the QDial.
I think I am missing the actual selector(QDial{property: value} that should be added insted of QDial.
CSS snippet:QDial { background-color:QLinearGradient( x1: 0.177, y1: 0.004, x2: 0.831, y2: 0.911, stop: 0 white, stop: 0.061 white, stop: 0.066 lightgray, stop: 0.5 #242424, stop: 0.505 #000000, stop: 0.827 #040404, stop: 0.966 #292929, stop: 0.983 #2e2e2e ); }
kindly help me through change the dial using css.
note: I don't want to use a custom dial as an alternative solution due to my constraint -
Hi
QDial is just a composite QWidget and does not really support style sheets directly.
https://doc.qt.io/qt-6/stylesheet-reference.htmlHowever, you can style some elements using QWidget etc as selectors.
Im not sure you can get the result you want without a custom QDial as seen here
https://forum.qt.io/topic/62315/design-a-custom-dial -
Hi
QDial is just a composite QWidget and does not really support style sheets directly.
https://doc.qt.io/qt-6/stylesheet-reference.htmlHowever, you can style some elements using QWidget etc as selectors.
Im not sure you can get the result you want without a custom QDial as seen here
https://forum.qt.io/topic/62315/design-a-custom-dial -