[Ctk-developers] ctkSliderWidget on ctkPopUpWidget: spinbox never gets keyboard focus

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Mon Nov 18 14:55:37 EST 2013


Hi Miklos,

Thanks for your contribution. Just tried your changes and it also fixes the
problem within Slicer. Would be awesome to integrate it.

If possible, could you consider adding a more descriptive commit message
explaining which problem the commit is fixing. Referencing the issue using
something like "See #409" would also be great.

Thanks
Jc


On Sun, Nov 17, 2013 at 1:55 PM, Julien Finet <julien.finet at kitware.com>wrote:

> Hi Miklos,
>
> This is great news !
> The patch looks good to me. Did you try it on windows, linux and mac ?
>
> Before merging, let's make sure Slicer still works with that change.
> I'm on vacation this week so it will be a challenge for me to run those
> tests, Jc, do you have time to try it ?
>
> Julien.
>
>
>
> On Sat, Nov 16, 2013 at 7:12 AM, Miklos Espak <espakm at gmail.com> wrote:
>
>> 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
>>>>>
>>>>>
>>>>
>>>
>>
>


-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20131118/2626f928/attachment.html>


More information about the Ctk-developers mailing list