Changing QDial angle range, zero-point, and pointer image
-
By default, it looks like the
QDial
has a ~270 degree range, with its zero-point at a roughly 225° angle, and a pointer image that is pretty much just a little circle (this part seems platform dependent?).All of these are things I'd like to change. My first intuition is to change
paintEvent
to change the range, zero-point, and the image (likely by drawing a custom pointer withQPainter
), and perhaps also changemouseEvent
to accommodate these changes.However, I'm not entirely sure how this would be done, as it would effectively mean completely redoing QDial's paint and mouse events that handle all the logic that results in the defaults mentioned above... any help?
-
@SGaist Yeah, I've seen that many times... I'd like to remove external dependencies as much as possible outside of what's actually necessary.
(It would also be a valuable learning experience to reimplement much of QDial to my needs.)
-
Hi,
Before trying to rebuild QDial from scratch, did you check the Qwt librairie Dial components ?
-
Hi,
Before trying to rebuild QDial from scratch, did you check the Qwt librairie Dial components ?
-
@SGaist Yeah, I've seen that many times... I'd like to remove external dependencies as much as possible outside of what's actually necessary.
(It would also be a valuable learning experience to reimplement much of QDial to my needs.)
-