Up/Down Arrow Buttons / QSpinBox without inputputfield ?
Hello Forum!
I am wondering whats the "best" way to implement an "Up/Down"-Arrow Field.
I need something to "move up or down" Elements, preferable something like an QSpinbox, but without the textinput.
My first idea had been to use a QSpinBox and hide the Inputfield, but I could not figure out how to do this.
My second approach was reimplementation of an QAbstractspinbox but this also did not work as i expected.
Now I guess my best option is to subclass a QPushbutton/Icon and check if the click is in the upper or lower half of the image.
Any better Idea? Did I miss something?
Marv.
Re: Up/Down Arrow Buttons / QSpinBox without inputputfield ?
What do you mean by "up/down arrow field"? If you don't want the user to be able to change the text in the edit field, then you simply set the widget to read-only. If doesn't make much sense to have an up/down control without being able to show what value is going up and down.
Re: Up/Down Arrow Buttons / QSpinBox without inputputfield ?
I want to move items one position up or down (this happens as soon you press the button), therefor i need something like a QSpinBox, but without the numbers showen (the numbers (int) will be needed internally, but not displayed to the user).
Re: Up/Down Arrow Buttons / QSpinBox without inputputfield ?
Two buttons in a vertical layout?
Cheers,
_
Re: Up/Down Arrow Buttons / QSpinBox without inputputfield ?
Sorry for the late reply. I searched a little while longer, but In the end I did as you suggested and it worked very well. Thanks!