octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53600] Use convention Qt event handling for c


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #53600] Use convention Qt event handling for consistent octave_dock_widget focusing
Date: Tue, 10 Apr 2018 03:16:33 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #1, bug #53600 (project octave):

It happens that octave_dock_widget currently has a virtual method "focus()"
which in theory serves the same purpose as Qt QWidget focusInEvent() handler. 
So I propose moving the contents of focus() to an overridden focusInEvent()
and then inherently make use of that code in all octave_dock_widget objects
simply by issuing the standard setFocus() method.  Changeset attached.

Note that I removed most of the setFocusProxy() from the objects inheriting
octave_dock_widget.  The focus behaved better that way because with that proxy
in place the focusInEvent never occurred.  (I suppose that is why someone put
the ->focus() virtual function in the code, to ensure that it is always
called.)  The thing to do if one needs to ensure some child in a
octave_dock_widget derivative gets the focus is to override and add to
focusInEvent(), some examples of which are already in the code.

(file #43865)
    _______________________________________________________

Additional Item Attachment:

File name:
octave-eliminate_focus_and_tab_to_front_functions-djs2018apr10.patch Size:13
KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53600>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]