Unsolved Connect cannot convert arg 1 from 'UI:MainWindow *' to 'const QObject *'
-
So in effort to fix my previous problem (link here), I wasn't able to figure out how to get the delegates working, so I instead made interior_paint inherit Mainwindow and changed the ui from private to protected. It's certainly not the prettiest thing, but it'll do until I learn some more. I simply put the connect in the constructor for interior_paint and it should work. However, I get this error:
error: C2664: 'const': cannot convert argument 1 from 'Ui::MainWindow *' to 'const QObject *'
and I don't know what's the cause of it. Can someone offer some advice?
-
Hi,
Can you you show the code that triggers that error ?
-
int_DB = new int_paint[size]; connect(ui, SIGNAL(MainWindow::send_to_int_paint(QString Usubstrate, QString UQuantity, QString UUOM,int UCoats)), &int_DB, SLOT(interior_paint::insert_to_database(QString Usubstrate, QString UQuantity, QString UUOM,int UCoats)));
-
Looks like you are missing an include statement somewhere and you are trying to connect to an array of int_paint ?