Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Detect input for Inplace editor

    General and Desktop
    2
    4
    2447
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      StrikeByte last edited by

      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)

      1 Reply Last reply Reply Quote 0
      • P
        p91paul last edited by

        a signal is received by a slot only if you call connect(). So, I think the best thing is to get an idea about connecting all your editable boxes in a cycle.

        1 Reply Last reply Reply Quote 0
        • S
          StrikeByte last edited by

          Is it possible to install an eventfilter on all classes derived from QObject?

          1 Reply Last reply Reply Quote 0
          • P
            p91paul last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post