pippo42
25th February 2010, 08:11
Hello,
I have created a class that inherits from QTableView and given it a signal. When I try to connect to it, I have an error message, at run time, that says that QTableView has no such signal but the object I am using is an instance of the class I have inherited from QTableView.
What I am doing wrong?
Here a sample of code that will make things clearer.
class MyTableView : public QTableView{
...
signals:
void mySignal(int);
};
MyTableView *myTableView=new MyTableView();
connect(myTableView, SIGNAL(mySignal(int)), ...
At run time, I have the error message:
Object::connect: No such signal QTableView::mySignal(int)
Thank you!
I have created a class that inherits from QTableView and given it a signal. When I try to connect to it, I have an error message, at run time, that says that QTableView has no such signal but the object I am using is an instance of the class I have inherited from QTableView.
What I am doing wrong?
Here a sample of code that will make things clearer.
class MyTableView : public QTableView{
...
signals:
void mySignal(int);
};
MyTableView *myTableView=new MyTableView();
connect(myTableView, SIGNAL(mySignal(int)), ...
At run time, I have the error message:
Object::connect: No such signal QTableView::mySignal(int)
Thank you!