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. Looking for a widget for selecting minimum and maximum in an interval
Forum Updated to NodeBB v4.3 + New Features

Looking for a widget for selecting minimum and maximum in an interval

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 3.7k Views 2 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.
  • H Offline
    H Offline
    Harry123
    wrote on last edited by
    #1

    Is there any widget that looks something like this :

    0_1508496474130_range selector.png

    I need such a widget that has :

    • Assignable minimum and maximum
    • Two movable handles for enlarging the minimum / reducing the maximum
    • The currently selected values are displayed near the handles
    J.HilkJ 1 Reply Last reply
    0
    • H Harry123

      Is there any widget that looks something like this :

      0_1508496474130_range selector.png

      I need such a widget that has :

      • Assignable minimum and maximum
      • Two movable handles for enlarging the minimum / reducing the maximum
      • The currently selected values are displayed near the handles
      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Harry123 hi,
      in QML theres the RangeSlider, for QWidgets we don't have a predefined RangeSlider widget. You'll have to create your own.

      Alternatively.
      Googling for QRangeSlider gave this result:
      https://github.com/rsgalloway/QRangeSlider

      Googling for QSelectionSlider gave exactly one result:
      This persons git-page

      might be usefull.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      H 1 Reply Last reply
      4
      • J.HilkJ J.Hilk

        @Harry123 hi,
        in QML theres the RangeSlider, for QWidgets we don't have a predefined RangeSlider widget. You'll have to create your own.

        Alternatively.
        Googling for QRangeSlider gave this result:
        https://github.com/rsgalloway/QRangeSlider

        Googling for QSelectionSlider gave exactly one result:
        This persons git-page

        might be usefull.

        H Offline
        H Offline
        Harry123
        wrote on last edited by
        #3

        @J.Hilk

        Thanks for your answer, but one is in Python while I use C++, and QSelectionSlider is not it and looks like this:

        0_1508507159959_screen006.jpg

        jsulmJ 1 Reply Last reply
        0
        • H Harry123

          @J.Hilk

          Thanks for your answer, but one is in Python while I use C++, and QSelectionSlider is not it and looks like this:

          0_1508507159959_screen006.jpg

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

          @Harry123 said in Looking for a widget for selecting minimum and maximum in an interval:

          but one is in Python while I use C++

          but it uses Qt right?

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

          H 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Harry123 said in Looking for a widget for selecting minimum and maximum in an interval:

            but one is in Python while I use C++

            but it uses Qt right?

            H Offline
            H Offline
            Harry123
            wrote on last edited by
            #5

            @jsulm

            It does - but there are hundreds of lines in a language that I don't know ...

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

              @Harry123
              Well im not sure it will have 2 handles anyway
              at least not like u show.

              but its styleable so may it could but i doubt it.

              from samples it looks like

              alt text

              Anyway, there is also
              https://libqxt.bitbucket.io/doc/tip/qxtspanslider.html#details
              alt text

              H 1 Reply Last reply
              1
              • mrjjM mrjj

                @Harry123
                Well im not sure it will have 2 handles anyway
                at least not like u show.

                but its styleable so may it could but i doubt it.

                from samples it looks like

                alt text

                Anyway, there is also
                https://libqxt.bitbucket.io/doc/tip/qxtspanslider.html#details
                alt text

                H Offline
                H Offline
                Harry123
                wrote on last edited by
                #7

                @mrjj

                Libqxt seems to require more than just the bare files of the class QxtSpanSlider. I downloaded the source, and it contains references to various internal functions of the library. I really hesitate to use such a large body of code, containing many references to various internal functions of the library, as I would probably end up by incorporating the entire library.

                Has nobody ever come up with something simple and self-contained ?

                mrjjM 1 Reply Last reply
                0
                • H Harry123

                  @mrjj

                  Libqxt seems to require more than just the bare files of the class QxtSpanSlider. I downloaded the source, and it contains references to various internal functions of the library. I really hesitate to use such a large body of code, containing many references to various internal functions of the library, as I would probably end up by incorporating the entire library.

                  Has nobody ever come up with something simple and self-contained ?

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Harry123
                  Yep Libqxt is a collection of widgets and they do reuse from the base.

                  I have not seen anything like the one you have shown. There has been questions about making a dual slider
                  if you use the search function but none provide a complete solution.

                  There are samples around you could adapt.

                  this one might be useful
                  https://stackoverflow.com/questions/17361885/range-slider-in-qt-two-handles-in-a-qslider

                  But as with all samples, it will need some work to be complete.

                  H 1 Reply Last reply
                  0
                  • mrjjM mrjj

                    @Harry123
                    Yep Libqxt is a collection of widgets and they do reuse from the base.

                    I have not seen anything like the one you have shown. There has been questions about making a dual slider
                    if you use the search function but none provide a complete solution.

                    There are samples around you could adapt.

                    this one might be useful
                    https://stackoverflow.com/questions/17361885/range-slider-in-qt-two-handles-in-a-qslider

                    But as with all samples, it will need some work to be complete.

                    H Offline
                    H Offline
                    Harry123
                    wrote on last edited by
                    #9

                    @mrjj

                    Thanks, but I have seen this answer and it's too much work just to beautify somewhat the UI.
                    I have for the moment I replaced this widget by from-to text fields which work just as well, although not as beautiful.
                    A great pity that such a widget is not provided as standard, but that's life.

                    mrjjM 1 Reply Last reply
                    0
                    • H Harry123

                      @mrjj

                      Thanks, but I have seen this answer and it's too much work just to beautify somewhat the UI.
                      I have for the moment I replaced this widget by from-to text fields which work just as well, although not as beautiful.
                      A great pity that such a widget is not provided as standard, but that's life.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Harry123
                      Yeah, sadly more focus on QML than extending the range of standard widgets included.
                      Also, for one widget, its a lot of work to make sure it works correctly across all
                      platforms supported.
                      However, the class SuperSlider linked to works fairly well so would not been that much extra work
                      but i agree its maybe be overkill of you need use it only once.

                      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