PDA

View Full Version : QtableView clicked() left or right button?



qlands
27th August 2011, 10:10
Hi,

In a QtableView when I connect the signal clicked() how can I know if if was emitted by the left or right button?

Thanks,
Carlos.

wysota
27th August 2011, 10:26
You can't. What do you need it for?

qlands
27th August 2011, 10:45
Laziness... I just want to code even less! :)

wysota
27th August 2011, 10:46
That doesn't answer my question.

qlands
27th August 2011, 10:51
Well, I just wanted to know when the user right clicked a cell so I can show some extra information. I can do it by subclassing the tableview and re-implement the release... But if there is another way around without subclassing...It might save me some extra lines of code.

wysota
27th August 2011, 10:54
See QWidget::contextMenuPolicy and friends