qobject_cast
is only for a class which inherit from QObject
. If item
is really of your custom type then use dynamic cast
EnhancedTableWidgetItem* eItem = dynamic_cast<EnhancedTableWidgetItem*>( item );
Nevermind. you are casting an object to a pointer. It will not work. Still, what I previously said still apply