148 questions
2
votes
1
answer
185
views
Windows 11 integrated virtual keyboard not called when clicking on QSpinBox
I'm creating a Qt Widgets application and deploying it on Windows 11 tablet.
Currently, when I click on a QLineEdit, the Windows 11 integrated virtual keyboard appears and I can edit the text. But, ...
2
votes
1
answer
198
views
Both QSpinBox's buttons increment its value when using a custom stylesheet
I need to style QSpinBox like this:
But when I did it with stylesheet, both down-button and up-button were incrementing value, where down-button should have decremented it.
Stylesheet:
QSpinBox {
...
1
vote
1
answer
215
views
QTimeEdit locks hour spining with range less than one hour with keyboardTracking deactivated
I have a QTimeEdit in Python with a predefined range less than one hour, let's say from 08:45:00 to 09:15:00. I read about the problematic of entering a new value which gets out these limits when ...
0
votes
1
answer
1k
views
QSpinBox Arrow Display Issue when using a Stylesheet
Qt 5.12 desktop widgets.
Trying to style a spinbox to match our application's existing colors and the up/down arrow images disappear from the associated buttons.
QSpinBox {
background: #474747;
...
0
votes
2
answers
401
views
Multiple arguments in slot
Want to pass two arguments to the slot. I have ui->spinBox, it has two signals valueChanged(int) and valueChanged(QString). I'm doing like that:
connect(ui->spinBox,&QSpinBox::valueChanged, [...
0
votes
1
answer
111
views
Call a function if cell value is changed - for dynamic number of spinBoxes in a table
I'm writing a software tool that has a table filled with two columns: parameter and precision. Some parameters in the "Precision" column have spinBox widget and some parameters have just ...
0
votes
1
answer
134
views
QSpinBox prevent the user from enternig thousand separators
In a QSpinBox, when the range is sufficient, the user is allowed to enter thousand separators.
Eg: 1.2.3.4 is a valid entry, en then fixup() just removes the dots. Resulting in 1234.
How can I prevent ...
0
votes
1
answer
309
views
Making numbers in readable format in QSpinBox
I'm using QSpinBox for displaying and changing numbers. But numbers are large enough, it's hard to read them for user. Now I'm going to format numbers, for example if the number is 12345678 it should ...
0
votes
0
answers
108
views
overriding the qspinbox class to evaluate mathematical expressions QT
I have a parser for math expressions. I need to redefine the QDoubleSpinBox class so that metamatics can be entered into it even after pressing enter. He figured them out. The problem is that the ...
0
votes
1
answer
1k
views
QML - SpinBox - how to know if it's UP or DOWN pressed
I'm trying to create a custom CustomSpinBox in QML and I want to increase or decrease the value from stepSize based on which button is going to be pressed. For example, if I am pressing the UP button ...
1
vote
1
answer
1k
views
How to call changeValue of QSpinBox only when user changed value
This is my QSpinBox slot method:
void MainWindow::on_sbObjectSize_valueChanged(int arg1)
{
/*do something*/;
}
I need to distinguish when this value was changed by user (by typing value or click ...
0
votes
0
answers
2k
views
QSpinBox fix up down buttons
I need to fix the arrows on my spin boxes, while also rounding the spinboxes. Please note that I am using QT designer, and pyqt5 (and importing, not using pyuic5)
Default spinbox "look"
...
0
votes
1
answer
75
views
How to read information of QTableWidget?
I have a QtableWidget and I have stored a QSpinBox in.
as below:
(product is a class).
void MainWindow:: add_to_basket (product p){
ui->tableWidget->insertRow(0);
QLineEdit *qle=new ...
2
votes
3
answers
310
views
How to reverse spinbox selection in PyQt5?
I have a spinbox in PyQt5 like below. How can I make the selection reversed? i.e. If I click down arrow, the value goes up, vice versa.
0
votes
0
answers
576
views
Python Qt SpinBox to update when out of focus
I am trying to get a QSpinBox to only send the new value when it changes from focused to unfocused so that it doesn't send an update every time a user changes a digit.
Currently it looks like this
...
1
vote
2
answers
2k
views
QSpinbox editingFInished signal on up/down arrow press
I went through a lot of posts regarding QSpinBox signals editingFinished and valueChanged, but not able solve my problem, ie,
I want editingFinished signal to be emitted, when user enters any value ...
1
vote
1
answer
1k
views
valueChanged(const Qstring &) not fired in qspinbox when empty
I'm having a QSpinbox inside a QTreeWidget following an approach similar to the approach for a combobox described here https://stackoverflow.com/a/4849010/10220019.
I've read here https://forum.qt.io/...
0
votes
2
answers
706
views
Why QSpinBox get focus when focusPolicy = NoFocus
Why QSpinBox receives focus at pressed Shift + Tab? How to fix?
Example:
Create a form as in picture 1.
Set spinBox_2 and pushButton_2 focusPolicy = NoFocus
Start, and try to press Tab several times, ...
2
votes
1
answer
280
views
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 ...
3
votes
1
answer
242
views
PySide get width of arrow button in QSpinBox
Is there a way to determine the width of the arrow buttons in the qspinbox?
I'm trying to overwrite the context menu event, and i only want my custom event to take place if the user right-clicks over ...
1
vote
1
answer
397
views
PySide: SpinBox use a set of fixed values
I need a spinbox (or something similar) to have a fixed set of values to use. SetSingleStep does not do the trick because i need something like:
1 -> 5 -> 10 -> 100
Any suggestions?
2
votes
1
answer
291
views
Qt QSpinbox accepting '+' symbol after setting range
I have a QSpinbox whose range I am setting:
QSpinBox *SpinBox = new QSpinBox;
SpinBox->setRange(0, 100);
However, I'm able to manually enter a + sign which is not reflected in my slot.
connect (...
2
votes
1
answer
758
views
QListView items also showing the delegate editor even though the delegate is only added to the QTableView
I have a QListView and a QTableView both have the same QStandardItemModel. I have added a custom delegator to the QTableView. Now when I go to my QTableView and double-click an item I see the delegate ...
0
votes
0
answers
182
views
setInputMask leads to thick cursor
When using setInputMask the text-cursor width changes. Due to that I can't place the cursor between two characters but it selects the whole character.
Is there a way to bypass this behaviour?
2
votes
1
answer
248
views
How to use superscripts in QDoubleSpinBox suffix
I am trying to format part of a suffix in a QDoubleSpinBox as a superscript.
Thus far I have tried the following:
self.myDblSinBox.setSuffix("Nsm<sup>-4</sup>")
and:
self.myDblSinBox....