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. How i can detecte QtableWidget editor opening
Forum Updated to NodeBB v4.3 + New Features

How i can detecte QtableWidget editor opening

Scheduled Pinned Locked Moved General and Desktop
13 Posts 2 Posters 3.7k Views 1 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    You could subclass QStyledItemDelegate and override editorEvent and send a signal from there when the right event happens

    Hope it helps

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • A Offline
      A Offline
      advseo32
      wrote on last edited by
      #3

      i have subclassed QStyleditemDelegate

      but really not works for me

      @bool customDelegateCombobox::editorEvent(QEvent* event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
      {
      if(event->type() == QEvent::InputMethod)
      qDebug() << "works";
      else
      return QStyledItemDelegate::editorEvent(event,model,option,index);
      }@

      1 Reply Last reply
      0
      • A Offline
        A Offline
        advseo32
        wrote on last edited by
        #4

        is there any working event to detect start editing in qtabelwidget cell

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #5

          What are the different events you are getting ? None of these would work for you ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            advseo32
            wrote on last edited by
            #6

            i tried

            @QEvent::EnterEditFocus
            InputMethodQuery@

            i think there is no other event that help to detect whether the user start typing in QtableWidget cell or not

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #7

              If I have read the documentation correctly, this function is called when the editing starts, so you would not even need to test the event, just send your signal and call the default implementation.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • A Offline
                A Offline
                advseo32
                wrote on last edited by
                #8

                [quote author="SGaist" date="1376776589"]If I have read the documentation correctly, this function is called when the editing starts, so you would not even need to test the event, just send your signal and call the default implementation.[/quote]
                Yes the function it called , but i don't want to detect user editing when
                he selects the cell , i want to detect when really he start typing

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  advseo32
                  wrote on last edited by
                  #9

                  Up !!!

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    advseo32
                    wrote on last edited by
                    #10

                    Up !!

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      Please, stop bumping your thread after only a few hours of waiting, the etiquette is to wait at least for 24 to 72 hours.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        advseo32
                        wrote on last edited by
                        #12

                        the function it called , but i don’t want to detect user editing when
                        he selects the cell , i want to detect when really he start typing

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          advseo32
                          wrote on last edited by
                          #13

                          plz i need some your help

                          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