Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Detect input for Inplace editor

Detect input for Inplace editor

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.7k Views
  • 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 Offline
    S Offline
    StrikeByte
    wrote on last edited by
    #1

    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
    0
    • P Offline
      P Offline
      p91paul
      wrote on last edited by
      #2

      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
      0
      • S Offline
        S Offline
        StrikeByte
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p91paul
          wrote on last edited by
          #4

          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
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved