[Qt-interest] Widget & Pop-up Focus
Freddie Witherden
freddie at witherden.org
Sat Oct 31 16:01:03 CET 2009
Hi,
I am currently attempting to sub-class QDoubleSpinBox so that when it obtains
click focus a slider is displayed below the widget in a pop-up -- allowing for
easy editing of the spin box value.
Currently my plan is to write a QFrame sub-class and inside of it place a
regular QSlider and then have my QDoubleSpinBox sub-class create an instance
of this. (I am basing my work off of the QtColorPicker solution.)
But, I am having some focus-related issues. Firstly, I wish for the slider to
only appear on ClickFocus events, as opposed to keyboard focus. Secondly, when
the pop-up is displayed ideally I would like it to only have mouse focus (so
keyboard taps still change the DoubleSpinBox).
The QtColorPicker solution does some of its work by using another event loop.
However, I am unsure if this is the best way to achieve what I require. Is the
focus granularity which I require available in Qt?
Regards, Freddie.
More information about the Qt-interest-old
mailing list