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. Implementing QSlider with two sliders
Forum Updated to NodeBB v4.3 + New Features

Implementing QSlider with two sliders

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 3.4k 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.
  • T Offline
    T Offline
    tesmai4
    wrote on last edited by
    #1

    I want to implement QSlider with two slider on it. Here is my scenario:

    I need to implement a 24 hour representation on a slider control. User would be allowed to move either of the sliders to any position on the bar. I'll take values of slider position as user selection. QSlider only provides me one slider on it. any idea on how to do it?

    Regards

    1 Reply Last reply
    0
    • jazzycamelJ Offline
      jazzycamelJ Offline
      jazzycamel
      wrote on last edited by
      #2

      Check out Qxt's "QxtSpanSlider":http://libqxt.bitbucket.org/doc/tip/qxtspanslider.html.

      Hope this help ;o)

      For the avoidance of doubt:

      1. All my code samples (C++ or Python) are tested before posting
      2. As of 23/03/20, my Python code is formatted to PEP-8 standards using black from the PSF (https://github.com/psf/black)
      1 Reply Last reply
      0
      • T Offline
        T Offline
        tesmai4
        wrote on last edited by
        #3

        Thanks for your reply. How can I integrate QxtSpanSlider into my existing QT project. It is not one of the standard QT modules.

        Regards,

        1 Reply Last reply
        0
        • jazzycamelJ Offline
          jazzycamelJ Offline
          jazzycamel
          wrote on last edited by
          #4

          You will have to build and install it (as per the "user guide":http://dev.libqxt.org/libqxt/wiki/user_guide) and then include Qxt in your .pro file (also detailed in the user guide).

          Alternatively, you can have a look at the source, see how they did and implement your own version.

          Hope this helps ;o)

          For the avoidance of doubt:

          1. All my code samples (C++ or Python) are tested before posting
          2. As of 23/03/20, my Python code is formatted to PEP-8 standards using black from the PSF (https://github.com/psf/black)
          1 Reply Last reply
          0
          • T Offline
            T Offline
            tesmai4
            wrote on last edited by
            #5

            Thanks for your answer. Is there any control available directly in QT?

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

              Hi,

              If you mean a "double edge" slider available in Qt ? No, but as jazzycamel wrote, you can use Qxt which is easy to integrate to a project.

              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