[Qt-interest] Widget & Pop-up Focus

Freddie Witherden freddie at witherden.org
Sun Nov 1 14:24:55 CET 2009


On Saturday 31 October 2009 15:01:03 Freddie Witherden wrote:
> 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).

I have been working a bit more on the widget but still am unable to shake my 
focus problems. Clicking on the box causes the pop-up to appear, and the 
slider can be dragged -- which is good -- and the focus rect of the spin box 
remains.

However, keyboard focus is lost and the +/- buttons do not work. Moreover, 
when the focus is lost to the pop-up it is lost for all widgets (nothing else 
can take focus).

I have attached the .h and .cpp files.

Regards, Freddie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slidingdoublespinbox.cpp
Type: text/x-c++src
Size: 1626 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091101/3c2936ca/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slidingdoublespinbox.h
Type: text/x-chdr
Size: 1266 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091101/3c2936ca/attachment-0001.bin 


More information about the Qt-interest-old mailing list