PDA

View Full Version : QIcon clicked signal



astibich
28th August 2014, 00:33
I'm using QIcon decorators in my QTableView cells and I would like to receive an event when the user clicks the icon. Is there any way to get a mouse click signal from a QIcon, or do I have to try to work it out from the QTableView clicked signal?

Thanks,

Aaron Stibich

anda_skoa
28th August 2014, 09:26
QIcon is a value class, it is not a QObject derived class. Only QObject derived class have signals.

A quick look into the documentation would have told you that as well.

Cheers,
_

d_stranz
29th August 2014, 00:30
Do you want something different to happen when the user clicks the icon as opposed to someplace else in the cell? You should probably create a custom QStyledItemDelegate for those cells and handle the clicks in the editor widget you create.