[Ctk-developers] ctkSliderWidget on ctkPopUpWidget: spinbox never gets keyboard focus
Miklos Espak
espakm at gmail.com
Sat Nov 16 14:12:09 UTC 2013
I found a simple solution. Could you please review and merge?
https://github.com/commontk/CTK/pull/410
On 16 November 2013 11:08, Miklos Espak <espakm at gmail.com> wrote:
> If I change the window flag from Qt::ToolTip to Qt::PopUp then the widget
> gets the keyboard focus, but then the panel cannot be pinned.
>
>
>
> On 15 November 2013 22:52, Julien Finet <julien.finet at kitware.com> wrote:
>
>> Hi Miklos,
>>
>> I've noticed that odd behavior but I haven't found the time to
>> investigate much further than what you already did.
>> My gut feeling is that it can't get focus because the popup window is not
>> "active" (only 1 window can be active at a time ?).
>> You might have to play with activateWindow() or something like that.
>>
>> Hth,
>> Julien.
>>
>>
>>
>> On Fri, Nov 15, 2013 at 12:28 PM, Miklos Espak <espakm at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I have a drop down control panel with some slider widgets on it.
>>>
>>> If I click into the spinbox, it should get the keyboard focus and the
>>> cursor should start blinking, but it does not. I can select the number by
>>> mouse, but cannot type anything into it.
>>>
>>> If I place the control panel on an ordinary QWidget, all works fine.
>>>
>>> I added an event filter to the line edit of the spin box to see if it
>>> gets the mouse pressed event. It does. But it does not get the FocusIn
>>> event. If I put the control panel an a QWidget, then the ctkDoubleSpinBox
>>> gets the FocusIn event.
>>>
>>> Has anybody tried to use a ctkDoubleSpinBox or similar on a
>>> ctkPopUpWidget?
>>>
>>> Any idea, why there the no FocusIn event is not emitted / received if
>>> the spinbox is on a popup widget, even if the mouse press event definitely
>>> arrives to the line edit?
>>>
>>> Cheers,
>>> Miklos
>>>
>>>
>>> _______________________________________________
>>> Ctk-developers mailing list
>>> Ctk-developers at commontk.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20131116/a970922a/attachment.htm>
More information about the Ctk-developers
mailing list