Questions tagged [qslider]

QSlider is a Qt class that represents a vertical or horizontal slider.

A slider lets a user move a handle along a horizontal or vertical line, and then translates the handle position into a value within a range.

To use QSlider, a number of options must be set, including:

  • minimum value through setMinimum()
  • maximum value through setMaximum()
  • step value through setSingleStep()

A minimalistic example of a QSlider looks like this:

QSlider *s = new QSlider();
s->setMaximum(100);
s->setMinimum(0);
s->setSingleStep(1);
s->show();

Official documentation can be found here.

147 questions
0
votes
1 answer

Preview image on slider of videoPlayer

I have a video player which displays images in QgraphicsScene frame by frame. There's a play button, which shows frames by frames, like video. I want to show the preview image when mouse hover the qslider for the player, like in YouTube n other…
Sayan Bera
  • 135
  • 2
  • 16
0
votes
2 answers

PyQt Slider widget alignment issue

I have a slider whose ticks should should have the names of the year. Below code works, but the label of the ticks are not aligned properly. Each year number should be besides a tick. class Slider(QWidget): def __init__(self, minimum, maximum,…
Rishik Mani
  • 490
  • 8
  • 27
0
votes
0 answers

QSlider postion changes only when minimazing app

I am using QSlider element in my app as a toogle switch. I took this project over from a colleage of mine who left. So far so good, except, that this switch has a black label around it. I can't really change the style and rework everything so, I am…
Them4
  • 1
  • 2
0
votes
1 answer

How to get value by clicking on the qslider?

So i am using Pyqt for creating GUI program using Python programming language. And i am trying to get the value of Qslider when clicking it, but i don't understand how... self.slide.mouseDoubleClickEvent= lambda event: self.slideclicked() This is…
user7429071
0
votes
2 answers

Maximum value of QSlider?

What is the maximum value of QSlider, in the datasheet, it is just mentioned as int. I tried with "1000000". but the Slider starts bugging. QSlider.setMaximum(1000000); Image with the bug, the blue color and the cursor don't move well at same…
gxmad
  • 1,650
  • 4
  • 23
  • 29
0
votes
1 answer

Pyqt slider not updating

I have created a GUI in Qt Designer with a horizontal slider inside a grid layout within a tab widget. Here is the code from the GUI.py file: self.horizontalSlider =…
0
votes
1 answer

Adding/Removing QSlider widgets on PyQt5

I want to dynamically change the number of sliders on my application window, in dependence of the number of checked items in a QStandardItemModel structure. My application window has an instance of QVBoxLayout called sliders, which I update when a…
Michele Ancis
  • 1,265
  • 4
  • 16
  • 29
0
votes
0 answers

QDialer range issue

I have problems using a QDial with a very big range. Using QDials with not too big ranges there is no problem, but using it with big ranges yes, for example: QDial *dial; dial->setRange(-50, 50) //goes well dial->setRange(-107000000, 107000000) //…
makiwhtie
  • 51
  • 6
0
votes
2 answers

QSlider - how to color the space

i need to design my QSlider ... I have start point and end point on the slider bar the start point and the end point is movable by the user now i need to color the space between the start point and the end point Please let me know your helps and…
user198725878
  • 6,266
  • 18
  • 77
  • 135
0
votes
1 answer

Getting a QDoubleDoubleSpinBox to display the (converted) value of a QSlider and still use setTracking(False)

I'm creating a ui for an animation tool I've written. The ui consists of a QDoubleSpinBox and a QSlider. I have connected the QSlider to the QDoubleSpinBox with functions to convert their values. I would like to keep the spinbox updating with the…
gonzalimator
  • 475
  • 1
  • 4
  • 9
0
votes
1 answer

How to increase QSlider size in QT for Linux?

I have a QSlider in Forms.I want a big sized slider, tried increasing slider pointer by stretching the height.But the pointer size remains same.However this is working fine with Windows.I want the same behavior in Linux. Someone please help…
vgokul129
  • 777
  • 12
  • 31
0
votes
1 answer

Is there a way to prevent Qt slider dragging beyond a value?

I have implemented the interface where the user is drawing a frame and then moving to next frame which will increment the slider value by 1. User can also increment or decrement the slider value. But, if user has drawn only upto frame 20 then user…
pixelite
  • 3
  • 3
0
votes
0 answers

Qt Having a distance bar between two QSliders

I'm creating a Custom Multi Slider, I have already created the slider with multiple handles on it. This is what it currently looks like: As you can see 3 handles. But see that bar in the middle? I need that to sit between the two alternate sliders…
Jake Wade
  • 571
  • 3
  • 19
0
votes
1 answer

How to keep a QSlider activated to allow movements with arrows at any time

I would like to be able to move a QSlider with arrows of the keyboard at any time. I want to be able to click anywhere on the QWindow and keep QSlider activated to move the cursor with the arrows. My problem is that move the cursor with arrows is…
Jeanstackamort
  • 309
  • 2
  • 4
  • 16
0
votes
2 answers

Qt: Creating a QDoubleSlider

I want to connect a QDoubleSpinBox with a QSlider like this: QObject::connect(ui->myDoubleSpinBox, SIGNAL(valueChanged(double)), ui->mySlider, SLOT(setValue(double))); QObject::connect(ui->mySlider, SIGNAL(valueChanged(double)),…
BlackMamba
  • 1,449
  • 2
  • 12
  • 18
1 2 3
9
10