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. {Solved} QTableWidget signal 'itemClicked' doesnt fire at all
Qt 6.11 is out! See what's new in the release blog

{Solved} QTableWidget signal 'itemClicked' doesnt fire at all

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.3k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi All,

    We are developing an application where we generate several QTableWidget objects dynamically and show them on the screen. The problem is when I connect to 'itemClicked' signal of the QTableWidget to my public slot, it doesn't get fire at all when I manually click on any of the QTableWidgetItem.

    I even tried itemActivated, itemPressed signals, but none of them works.

    However, signal 'currentItemChanged' gets fired properly.

    am I missing something?

    Regards,
    Vrushali

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vdc82
      wrote on last edited by
      #2

      hi,

      Do you setup the QApplication correctly?

      @
      #include "mainwindow.h"
      #include <QApplication>
      int main(int argc, char *argv[]) {
      QApplication a(argc, argv);//<--- important
      MainWindow w;
      w.show();
      return a.exec(); //<--- important
      }
      @

      2nd: do you use QTableWidget in a separate event loop (QObject::moveToThread)?

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi,

        I restarted the Qt Creator and system and issue seems to be resolved...

        Thanks for your help !

        1 Reply Last reply
        0
        • IamSumitI Offline
          IamSumitI Offline
          IamSumit
          wrote on last edited by
          #4

          Hi.
          Please add {SOLVED} before the title if your problem is solved.
          So other members can notify that solution has been found.
          Thanks.

          Be Cute

          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