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

QSlider Stylesheet

I'm using QT widgets.I want to change the style of SliderBar.I can make it like this at the end of my efforts. I did this but I need this I am sharing the stylesheet codes below. How can I do as shown in the second…
0
votes
1 answer

PyQt: How to set QSlider moves automatically over time?

I have a GUI for a network of nodes. There are time-based data logs that I read from to make changes to the nodes. In the GUI I plot the nodes as QGraphicsItems. Based on the logs, the nodes change for example their colors and positions over time. I…
Victor
  • 1
0
votes
0 answers

QSlider handle does not move programmatically after moving the handle manually

I have a slider that can be controlled by rewind/forward buttons or manually. When I start the application, clicking the buttons works fine and the slider moves as desired. However, if I drag the slider handle to a given position, the buttons still…
0
votes
0 answers

How to make PyQt5 QSlider to move over time?

I'm using PyQt5 to make a music player. I wanna know how to move QSlider over time. I wrote some code but when i run it the program crashes. I wanna know how to implement it. I searched for this in google and read the documentation but I didn't find…
0
votes
1 answer

adjust brightness of led using QSlider and PWM in arduino

i try to control the brightness of the led with QSlider qt ui.i was facing issue which is led not turn on with the slider value. i think it has taken value like 123456... then i tried solution which is add some separator.. parseInt() stops on any…
coder
  • 52
  • 1
  • 6
0
votes
2 answers

QSlider: add "special" tick markers at arbitrary indices

I wonder if it is possible and what would be the simplest way to add special ticks at arbitrary indices of a QSlider. Any info or documentation in this direction would be highly appreciated. To shed a bit of light into what I would like to achieve,…
deponovo
  • 1,114
  • 7
  • 23
0
votes
2 answers

How to realize the slider with circular hollow handle in qt

is there a way to implement the slide bar with a circular hollow handle in QT?
zhiyi
  • 111
  • 1
  • 9
0
votes
1 answer

PyQt5 - QSlider in real time

I'm creating a software to read and process videos. I just began this project but I already have an issue. I want to create a slider which reacts in real time. Currently, the slider only moves around very seconds. My slider is set up like that. …
StuDig
  • 5
  • 2
0
votes
1 answer

How to create a QSlider with a non-linear scale?

Is there a simple way to implement a non-linear scale to a QSlider? I want to implement a logarithmic scale to it. The only workaround I am thinking of is manipulating the value change signals outside of the class.
0
votes
0 answers

Customization of QSlider

I try to make a slider, where I could change a color of selected part of groove, but I really have no idea, how it can be done.
Grigorkos
  • 11
  • 2
0
votes
1 answer

PyQt5 QSlider two positions

I want the user to select two frequencies: one low frequency and one high frequency. Can I make this with one QSlider? I found this page: https://doc.qt.io/qt-5/qtwidgets-widgets-sliders-example.html but it hasn't something that can I use for this…
Chris P
  • 2,059
  • 4
  • 34
  • 68
0
votes
1 answer

QToolButton with popup QSlider

I'm trying to make volume button, on click it should mute/unmute and and on hover it should popup QSlider, so user can set whatever level he wants. Now I'm trying to achieve this by showing slider window in enterEvent and hiding it in…
JuicyKitty
  • 318
  • 1
  • 16
0
votes
1 answer

How could I create "markers" for a QSlider on PySide2?

This picture is a pretty good representation of what I'm trying to emulate. The goal is to create items or widgets, looking like the example above, that a user could create on a QSlider by a MouseDoubleClicked event, and which would remain at the…
hugodurmer
  • 11
  • 3
0
votes
1 answer

How do I customize a QSlider that would work with timestamps?

I am new working with QT. I am familiar with the QSlider class of Qt. But I am not sure whether it works with Timestamps. I have a QSlider object that can return an integer based on the position of its tick. However I want to customize it so that it…
Sabbir Talukdar
  • 115
  • 2
  • 11
0
votes
1 answer

Problem with connecting QLabel to QSlider

I have a problem. I've created a class, in which I have a slider and a label. I want to connect these with the QObject::connect, but when I do it, nothing happens. Can you tell me what am I doing wrong? My class: class Loads :public QObject { …
donefun
  • 51
  • 5