Use this tag for questions about the QDoubleSpinBox class - part of the Qt framework that provides a spin box widget that takes doubles. When using this tag also include the more generic [qt] tag where possible.
Questions tagged [qdoublespinbox]
20 questions
3
votes
1 answer
Set QDoubleSpinBox value to an empty string, when not enabled
If I have a QDoubleSpinBox and have a method available called setEnabled which takes a boolean value. If this value is set to False, the QDoubleSpinBox will appear greyed, showing the number inside the Spin Button, but not allowing the user to type…

user12388651
- 179
- 1
- 8
3
votes
3 answers
Why is the precision of a QDoubleSpinBox sometimes higher than its decimals property allows?
In PySide2, if I create a QDoubleSpinBox and explicitly set its decimals-property to 2 and its singleStep-property to 0.1 and then change its value via the up/down buttons, the printed value sometimes has a much higher precision.
Why is that…

S818
- 391
- 3
- 15
3
votes
1 answer
How to always show sign (+ or -) in QDoubleSpinbox?
If the value in the QDoubleSpinbox is positive, it shows no sign.
If the value is changed to a negative one, it automatically adds the "-" sign.
If the prefix is forced to "+", then the positive numbers will displayed with…

Alechan
- 817
- 1
- 10
- 24
2
votes
0 answers
Connecting QSlider and QDoubleSpinBox gets stuck on certain values
I'm using mostly double spin boxes in my application and I'm connecting each one to a slider to sync up their values.
The method I'm using works perfectly except when the spin box value reaches 0.28, 0.56, and 1.12. When using my scroll wheel to…

user13635572
- 21
- 2
2
votes
1 answer
Dynamic convert qspinbox to qdoublespinbox
I have a qspinbox which use int values only. Also i have checkbox. If checkbox == 0, qspinbox must use int values only, but if checkbox == 1, qspinbox must use float values only. Is It possible? Maybe it is possible with qdoublespinbox?

Владимир Чернов
- 31
- 2
2
votes
1 answer
how to add an action to QtCore.Qt.DefaultContextMenu on Qdoublespinbox on right cilck?
I have developed a fairly complex GUI tool using the Qt Designer.
For more details about the tool see: https://github.com/3fon3fonov/trifon
I have defined many QDoubleSpinBox entries and by default the Qt Designer sets their right-click menu policy…

Trifon Trifonov
- 55
- 2
- 9
1
vote
1 answer
Is it possible to set only 100 Percent value share limit to all QDoubleSpinBoxes?
I want to share 100 percent value limit to all QDoubleSpinBoxes. If it is possible how to do?
self.SpinBox_one = QtWidgets.QDoubleSpinBox()
self.SpinBox_two = QtWidgets.QDoubleSpinBox()
self.SpinBox_three = QtWidgets.QDoubleSpinBox()
…

user3030327
- 411
- 1
- 7
- 19
1
vote
1 answer
QDoubleSpinBox which accept dots and also commas as a decimal separator
I need a spinbox which accept dots and also commas as a decimal separator.
I've changed the Locale settings: self.setLocale(QLocale(QLocale.C))
Because of that, my spinbox accept a dot as a decimal separator. A comma also shows up on screen when the…

Nelli
- 11
- 2
1
vote
1 answer
How to mark the whole text by double clicking for QDoubleSpinBox?
I have a class which inherit from QDoubleSpinBox.
class NumericEdit : public QDoubleSpinBox
{
public:
NumericEdit( QWidget *p_parent = nullptr );
protected:
bool event( QEvent *p_event ) override;
void keyPressEvent( QKeyEvent…

songvan
- 369
- 5
- 21
1
vote
1 answer
Function validate of QAbstractSpinBox
I am reading this function in QT Docu
It says
QValidator::State QAbstractSpinBox::validate(QString &input, int &pos) const [virtual]
This virtual function is called by the QAbstractSpinBox to determine whether input is valid. The pos parameter…

trangan
- 341
- 8
- 22
1
vote
2 answers
Make setDecimals work with overriden QDoubleSpinBox
iv'e changed QDoubleSpinbox because i wanted '.' instead of ',' but now setDecimals doesn't work... How do i retain the functionality of qdoublespinbox respective to setdecimals and retain my overriden class(or something equivalent/better)?
I tried…

n00p
- 269
- 4
- 11
0
votes
1 answer
how to detect signals from cells within a QTableWidget that contain spinboxes or comboboxes?
I have a QTableWidget that is made up of two columns: Diameters and Areas
I inserted QDoubleSpinBoxes into every cell. When I enter data into one, I want to be able to detect that and automatically generate the area using the value I inserted in the…

Mohamed El Kayal
- 179
- 12
0
votes
1 answer
Qdoublespinbox does not allow values less than 1
Qdoublespinbox does not allow values less than 1, decimal values with precision grater than 1, values in positive range 0.00 - 0.99 (for example). There is no problem with setting it´s value to 1.1, 1.11, 1,04, but not 0.5 .... it is rounding up…

yo.alucino
- 25
- 6
0
votes
1 answer
select all content upon receiving focus
I have the following problem, I have a QTableWidget to which I have added some QDoubleSpinBox to some cells, all good so far my question is how I can do to select all the content of the spinbox when changing the focus, I mean when pressing the key…

Lincoln Ingaroca
- 116
- 8
0
votes
0 answers
Is there Qt function that allow me to insert QSpinBox to MainWindow?
I am creating SpinBox and then I am trying to make it visible inside my MainWindow. Is it any way to do it?
Basically I am creating double array of Spinboxes dynamically in loop like this
array=new QSpinBox *[y+1];
and in another loop like…

Mike
- 1