Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Proper way to inherit QGraphicsProxyWidget
musimbate last edited by
I am trying to inherit QGraphicsProxyWidget so I can add custom QWidget based items to my scene but the application is having problems when quitting.I think the problem has sth to do with parents somehow and the application is having problems when cleaning up before it quits.
Here is my header:
class UBGraphicsTableItem :public QObject,public QGraphicsProxyWidget,public UBItem
UBGraphicsTableItem(const int & rows,const int & columns);
QTableWidget * mTableWidget;
In the cpp file,I simply create tha tableWidget and assign it to the proxy .
UBGraphicsTableItem::UBGraphicsTableItem(const int & rows,const int & columns)
mTableWidget=new QTableWidget(rows,columns); mTableWidget->setFixedWidth(500); setWidget(mTableWidget);
When I comment out everything that relates to the tableWidget ,all works fine suggesting that my tableWidget is not being integrated well with the proxyWidget.Any help would be appreciated as to what I might be doing wrong here.