PyQt4 QTablewidget cell sginals problem
hi everyone,
I have a tiny problem with a simple implementation:
- i have a main window with a table in my central widget
- i want to add stuff in the table gradually, and I allow only the 1st cell (index 0) of each row to be selectable.
- on the double click of the cell, i want to pop up a dialog.
I've tried connecting the :
- itemDoubleClicked (QTableWidgetItem *)
- cellDoubleClicked(int,int)
- cellClicked(int,int)
signals.
The slot connected to these signals is a generic function, which will go through the list of objects which are related to the table entries, and open a dialog related to the table entry that was double clicked (or clicked).
Problem: I get a double popped up dialog. Why is that? All the other dialogs I use only come up once? What am I missing?
If this isn't clear enough, I'll try and simplify, but my work has become quite huge...
Thanks in advance for any advice,
T
tzushky
Junior Poster in Training
96 posts since Jun 2008
Reputation Points: 10
Solved Threads: 5
Just adding something new:
It is when I have 2 items in the table (2 rows) that I get 2 dialogs, (the slot is called twice). I figured that the cell or item clicked are generated for the whole table, the idea would be thus for me to find an item signal rather than a table signal.
What do you think of this ?
tzushky
Junior Poster in Training
96 posts since Jun 2008
Reputation Points: 10
Solved Threads: 5
Problem: I get a double popped up dialog. Why is that?
You would have to be calling it twice but without any code no one can help. Post a simple example.
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714