Home > other >  Rookie help, questions about QTableWidget click
Rookie help, questions about QTableWidget click

Time:04-15

I wanted to do some operations after QTableWidget click, but now found that don't really get the click event, my code is written so: in the constructor connect (UI) tableWidget, SIGNAL (itemClicked (QTableWidgetItem *)), and this, SLOT (testSlot (QTableWidgetItem))); The corresponding slot function void Table_RC: : testSlot (QTableWidgetItem * item) {UI. PushButton - & gt; SetText (" BBB "); } then find no reaction, when you click is excuse me why? Thank you very much!

CodePudding user response:

????? ItemDoubleClicked give it a try? At the wrong place, ha ha,,, the UI has been setup successfully? Don't see where there's a problem ~ ~ ~

CodePudding user response:

Reference 1 floor yangfanxing published in 2010-03-27 so:????? ItemDoubleClicked give it a try? At the wrong place, ha ha,,, the UI has been setup successfully? Don't see where there's a problem ~ ~ ~ the UI has been setup successfully DoubleClicked also tried I also particularly curious why not try void itemSelectionChanged () when the signal is ok

CodePudding user response:

Fixed form inside when the content of the item is empty itemClicked not is, must be value the item can be but I still is not very good although the item's text is empty but * item should signal not how ah

CodePudding user response:

If the item is set to not edit then Clicked?

CodePudding user response:

Reference 3 floor bahuasheng in 2010-03-28 published the preserving: fixed form inside when the content of the item is empty itemClicked no is, must be value the item can be but I still is not very good although the item's text is empty but * item should signal not ah how can your initial form is empty? Because with similar tableWidget - & gt; SetItem (0, 0, new QTableWidgetItem (" XXX ")); Only the Item, otherwise there is no really,

CodePudding user response:

Refer to the fifth floor yangfanxing in 2010-03-28 published 11: your initial form is empty? Because with similar tableWidget - & gt; SetItem (0, 0, new QTableWidgetItem (" XXX ")); . Form is literally dragged N rows of N columns of just the content inside is empty set to edit and doesn't work I tried

CodePudding user response:

Well, and summarizes the above post, if the Item is empty, no access to the event message, do not know whether so,,, should be,

CodePudding user response:

Item have value and editing, will trigger the itemclicked events;
The item value but editable, not trigger this itemclicked event,
  • Related