Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Implementing QSlider with two sliders

    General and Desktop
    3
    6
    2950
    Loading More Posts
    • 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
      tesmai4 last edited by

      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 Reply Quote 0
      • jazzycamel
        jazzycamel last edited by

        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 Reply Quote 0
        • T
          tesmai4 last edited by

          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 Reply Quote 0
          • jazzycamel
            jazzycamel last edited by

            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 Reply Quote 0
            • T
              tesmai4 last edited by

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

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • First post
                  Last post