This is really great! I was trying to add it the other day but totally failed. It was very needed cause it makes the widget so much easier to use.
Unfortunately I can't help you with the signal/event review but from the little I know they seem fine. I just have one question: why was not it possible to add Enter as a keyboard shortcut to the widget here?
(I say add it, because F3 has to continue working as usual). I mean, ¿why Enter has to be registered and processed as a keyboard event? I'm just asking because it seems a bit more complicated than adding a shortcut.
> In particular, I am interested if it is possible to pass parameters to > signal handler.
> Thanks for the feedback.
> -- > You received this message because you are subscribed to the Google > Groups "spyder" group.
> To view this discussion on the web visit > https://groups.google.com/d/msg/spyderlib/-/-ToQ_i5iSjcJ.
> To post to this group, send email to spyderlib@googlegroups.com.
> To unsubscribe from this group, send email to > spyderlib+unsubscribe@googlegroups.com.
> For more options, visit this group at > http://groups.google.com/group/spyderlib?hl=en.
On Fri, May 4, 2012 at 3:54 PM, Carlos Córdoba <ccordob...@gmail.com> wrote:
> This is really great! I was trying to add it the other day but totally
> failed. It was very needed cause it makes the widget so much easier to use.
> Unfortunately I can't help you with the signal/event review but from the
> little I know they seem fine. I just have one question: why was not it
> possible to add Enter as a keyboard shortcut to the widget here?
> (I say add it, because F3 has to continue working as usual). I mean, ¿why
> Enter has to be registered and processed as a keyboard event? I'm just
> asking because it seems a bit more complicated than adding a shortcut.
I understood that these shortcuts are global - even if the panel is
inactive, they still work. I needed Enter shortcut processed only when
widget is active. More than than - this shortcut is only active in
ComboBox widget. It was also possible to override keyPressEvent() in
parent FindReplace() widget, but then Enter will work as find_next()
when focus was on all other elements too.
I thought writing a tutorial of resolving this particular bug into
Spyder blog as an example of reverse engineering for new people, but
quickly realized that I've run out of time. =)
> On Fri, May 4, 2012 at 3:54 PM, Carlos Córdoba<ccordob...@gmail.com> wrote:
>> This is really great! I was trying to add it the other day but totally
>> failed. It was very needed cause it makes the widget so much easier to use.
>> Unfortunately I can't help you with the signal/event review but from the
>> little I know they seem fine. I just have one question: why was not it
>> possible to add Enter as a keyboard shortcut to the widget here?
>> (I say add it, because F3 has to continue working as usual). I mean, ¿why
>> Enter has to be registered and processed as a keyboard event? I'm just
>> asking because it seems a bit more complicated than adding a shortcut.
> I understood that these shortcuts are global - even if the panel is
> inactive, they still work. I needed Enter shortcut processed only when
> widget is active. More than than - this shortcut is only active in
> ComboBox widget.
I tried it and you're totally right here. I understand know you solution and think it's the right approach, thanks for the explanation.
> It was also possible to override keyPressEvent() in
> parent FindReplace() widget, but then Enter will work as find_next()
> when focus was on all other elements too.
> I thought writing a tutorial of resolving this particular bug into
> Spyder blog as an example of reverse engineering for new people, but
> quickly realized that I've run out of time. =)
If you finally find the time, it would be a great reading for the other devs and future contributors :)
On Fri, May 4, 2012 at 1:54 AM, anatoly techtonik <techto...@gmail.com>wrote:
> Hi,
> I've fixed a long annoyance in Spyder - implemented "find next" on Enter.
> This is my first experience with Qt signal/event processing, so I'll
> appreciate if somebody could review this change and tell if it could be
> done better.
> In particular, I am interested if it is possible to pass parameters to
> signal handler.
> Thanks for the feedback.
Looks great. You essentially did the same thing that Pierre had done in
PatternComboBox, which is override keyPressEvent, so if there are
complaints now there should have been complaints earlier :). It's the right
way to go to accomplish what you intended to do as far as I know. I had
just one question, which I attached to a code review here: