Qt Embedded: How to set text for QScrollbar's navigation buttons?
-
wrote on 8 Feb 2018, 14:49 last edited by
Hi,
I'm currently setting images on the navigation buttons using stylesheet, but the requirement is to not use images. Hence, Can I set text for the QScrollBar navigation buttons, as in qpushbutton?
-
wrote on 8 Feb 2018, 15:35 last edited by
I don't think you can. But you should be able to subclass QScrollbar into your own class and draw the text it in paintEvent().
-
wrote on 8 Feb 2018, 19:15 last edited by vdevadass 2 Aug 2018, 19:25
QScrollBar navigation buttons,by default, have navigation arrows on them, correct?
Also, instead of paint, can i specify a SVG code (not SVG image) in the qt stylesheet?
-
Hi,
AFAIK, no.
Out of curiosity, why can't you use images ? And what do you want to replace these arrows with ?
-
wrote on 15 Feb 2018, 09:15 last edited by
We do not want use images because of its inflexibility in scaling, we want to use unicode symbol and set a bigger font size for unicode glyphs.
We want to replace them with Unicode character arrows.
Well for now, if i remove the images, default arrows should be displayed on the buttons right?
-
We do not want use images because of its inflexibility in scaling, we want to use unicode symbol and set a bigger font size for unicode glyphs.
We want to replace them with Unicode character arrows.
Well for now, if i remove the images, default arrows should be displayed on the buttons right?
@vdevadass Don't SVG images scale as those are vector graphics?
-
wrote on 22 Feb 2018, 08:58 last edited by
Can we add SVG graphics as part of the Qt stylesheet?
2/7