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

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 ?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.