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 4.8 QSlider handle size
Forum Updated to NodeBB v4.3 + New Features

Qt 4.8 QSlider handle size

Scheduled Pinned Locked Moved Solved General and Desktop
54 Posts 3 Posters 9.0k 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.
  • hskoglundH Online
    hskoglundH Online
    hskoglund
    wrote on last edited by
    #44

    Hi, if you're seeing four handles now, if I look at your screenshot above, I see only three handles.
    Could you take a picture of the code now after you've corrected it?

    1 Reply Last reply
    0
    • SPlattenS Offline
      SPlattenS Offline
      SPlatten
      wrote on last edited by
      #45

      Its only 3 because the vertical handles are tracking and it was resized to obscure the one under it. Now the CSS is fixed both sets of handles move together.

      I can't really do the screen shot until Thursday so I'm hoping it isn't required?

      Kind Regards,
      Sy

      1 Reply Last reply
      0
      • hskoglundH Online
        hskoglundH Online
        hskoglund
        wrote on last edited by
        #46

        Aha nice! So if they move together (both horizontally and vertically) that means your screen now looks similar to my screenshot 5 days ago?
        Which means you can use this as a solution for displaying classical grooves and simultaneously having resizable QSlider handles on your Qt 4.8.4...

        SPlattenS 1 Reply Last reply
        0
        • hskoglundH hskoglund

          Aha nice! So if they move together (both horizontally and vertically) that means your screen now looks similar to my screenshot 5 days ago?
          Which means you can use this as a solution for displaying classical grooves and simultaneously having resizable QSlider handles on your Qt 4.8.4...

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #47

          @hskoglund , I'm just a little confused as to why you chose to show four sliders when only two are required?

          Kind Regards,
          Sy

          1 Reply Last reply
          0
          • hskoglundH Online
            hskoglundH Online
            hskoglund
            wrote on last edited by
            #48

            I tried lots of variations with just one QSlider, but couldn’t find a way to both have a resizable handle and proper grooves.
            So by introducing one extra ”dummy” QSlider hidden underneath, was a way out of this dilemma.

            1 Reply Last reply
            0
            • hskoglundH Online
              hskoglundH Online
              hskoglund
              wrote on last edited by
              #49

              Forgot to say:: the reason for having 4 sliders instead of 2 was just for the demo (and to make sure horizontal and vertical QSliders behaved the same)

              SPlattenS 1 Reply Last reply
              2
              • hskoglundH hskoglund

                Forgot to say:: the reason for having 4 sliders instead of 2 was just for the demo (and to make sure horizontal and vertical QSliders behaved the same)

                SPlattenS Offline
                SPlattenS Offline
                SPlatten
                wrote on last edited by SPlatten
                #50

                @hskoglund , I know this is quite an old post now, I've been working on other stuff and now revisiting this, here are a few observations:

                1. With QSlider style set as follows:
                QSlider::groove:vertical {
                    background: transparent; 
                }
                QSlider::handle:vertical {
                  background: #eeeeee;
                  border: 1px solid grey;
                  width: 80px; 
                  height: 10px;
                }
                QSlider::groove:horizontal {
                    background: transparent; 
                }
                QSlider::handle:horizontal {
                  background: #eeeeee;
                  border: 1px solid grey;
                  width: 10px; 
                  height: 80px;
                }
                

                With the above both handles appear the correct size and orientation. No groove is obviously visible.

                If I remove the content of the groove style just leaving:

                QSlider::groove:vertical {
                }
                QSlider::handle:vertical {
                  background: #eeeeee;
                  border: 1px solid grey;
                  width: 80px; 
                  height: 10px;
                }
                QSlider::groove:horizontal {
                }
                QSlider::handle:horizontal {
                  background: #eeeeee;
                  border: 1px solid grey;
                  width: 10px; 
                  height: 80px;
                }
                

                Whilst the groove and ticks are now visible the handle is the wrong way in both orientations.

                Kind Regards,
                Sy

                1 Reply Last reply
                0
                • hskoglundH Online
                  hskoglundH Online
                  hskoglund
                  wrote on last edited by
                  #51

                  Hi, I tried your QSlider style set without any contents in the groove style in my demo program above but couldm't reproduce the handle being drawn the wrong way. Could you make a small demo app of the bug?

                  SPlattenS 1 Reply Last reply
                  0
                  • hskoglundH hskoglund

                    Hi, I tried your QSlider style set without any contents in the groove style in my demo program above but couldm't reproduce the handle being drawn the wrong way. Could you make a small demo app of the bug?

                    SPlattenS Offline
                    SPlattenS Offline
                    SPlatten
                    wrote on last edited by
                    #52

                    @hskoglund , thank you , are you using the same version of QT?

                    Kind Regards,
                    Sy

                    1 Reply Last reply
                    0
                    • hskoglundH Online
                      hskoglundH Online
                      hskoglund
                      wrote on last edited by
                      #53

                      No, I have Qt 4.8.7 (not 4.8.4) but it shouldn't matter.

                      SPlattenS 1 Reply Last reply
                      0
                      • hskoglundH hskoglund

                        No, I have Qt 4.8.7 (not 4.8.4) but it shouldn't matter.

                        SPlattenS Offline
                        SPlattenS Offline
                        SPlatten
                        wrote on last edited by SPlatten
                        #54

                        @hskoglund thank you, just wanted to be sure it wasn’t a much later version. Although even the difference between 4.8.4 and 4.8.7 could still mean a bug in a earlier release.

                        Kind Regards,
                        Sy

                        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