Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt custom UI vertical slider?
Qt 6.11 is out! See what's new in the release blog

qt custom UI vertical slider?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.3k Views 1 Watching
  • 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.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #1

    16294cf4-2cf7-4e5b-b295-beb9cf66224f-image.png

    I have a question while I'm making customization, and I'd like to drag up and down the part that I checked in red.

    How can I approach it and make a ui?
    My guess is we can make a variation of the vertical slider, but I'm wondering if there's a better way.

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

      Hi,

      Since it's a form of slider, it's not a bad idea. You would already have the value handling available from the start.

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

      I 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Since it's a form of slider, it's not a bad idea. You would already have the value handling available from the start.

        I Offline
        I Offline
        IknowQT
        wrote on last edited by
        #3

        @SGaist

        Is it implemented using qstyleoptionslider?
        I don't know, maybe a simple example.

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

          No, it should be based on QAbstractSlider with custom painting.

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

          I 1 Reply Last reply
          0
          • SGaistS SGaist

            No, it should be based on QAbstractSlider with custom painting.

            I Offline
            I Offline
            IknowQT
            wrote on last edited by
            #5

            @SGaist

            df481ec8-797e-48d6-9ea5-3d2b3496076f-image.png

            06144678-e13f-407f-b74c-230bca021369-image.png

            I think the way you taught me is too much for me, so I've transformed Slider into a stylesheet in the simplest way.

            I want to write text in the slider, how can I access it?

            And when the slider handle comes down to the top or bottom, the border-radius doesn't apply, so it comes out angled. What should I do?

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

              @IknowQT said in qt custom UI vertical slider?:

              I want to write text in the slider, how can I access it?

              Subclass and do custom painting so you are back at my initial suggestion.

              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

              • Login

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