0

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

2
Contributors
2
Replies
5
Views
7 Years
Discussion Span
Last Post by woooee
0

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 ?

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.