View Full Version : QIcon clicked signal

28th August 2014, 01: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?


Aaron Stibich

28th August 2014, 10: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.


29th August 2014, 01: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.