Detect input for Inplace editor
-
I'm trying to create an inplace editor (Virtual keyboard with it's own editbox, it only sends the data when done typing and it is aware of the content type)
Is there a way to detect if an editable box is clicked, without connecting the signals on all the editable boxes? I would like to make it a library that I can use in all kinds of applications.
I'm using a QT widget application (not an embedded linux version) -
Is it possible to install an eventfilter on all classes derived from QObject?
-
no, but you can install the event filter on all childs of a widget;
e.g subclass QWidget overrinding method eventFilter() (see "there":http://doc.qt.nokia.com/4.2/eventsandfilters.html;)
Create a widget of this new type (in qtdesigner create a qwidget and then use promote to... to change is type)
put all widget you want inside it;
get the list of widgets with "findChildren()":http://doc.qt.nokia.com/4.2/qobject.html#findChildren
iterate over the list and use installEventFilter on each widget.You should be fine.