Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Embedded: How to set text for QScrollbar's navigation buttons?

Qt Embedded: How to set text for QScrollbar's navigation buttons?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
7 Posts 4 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vdevadass
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      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().

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vdevadass
        wrote on last edited by vdevadass
        #3

        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?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          AFAIK, no.

          Out of curiosity, why can't you use images ? And what do you want to replace these arrows with ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vdevadass
            wrote on last edited by
            #5

            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?

            jsulmJ 1 Reply Last reply
            0
            • V vdevadass

              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?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @vdevadass Don't SVG images scale as those are vector graphics?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • V Offline
                V Offline
                vdevadass
                wrote on last edited by
                #7

                Can we add SVG graphics as part of the Qt stylesheet?

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved