I get the following error when trying to connect two classes together:
qapp.cpp: In static member function 'static bool QApp::eventFilter(void*)':
qapp.cpp:32: error: cannot call member function 'void QApp::mouseCoord(int, int, int, int, int)' without object
qapp.cpp: In static member function 'static bool QApp::eventFilter(void*)':
qapp.cpp:32: error: cannot call member function 'void QApp::mouseCoord(int, int, int, int, int)' without object
To copy to clipboard, switch view to plain text mode
main.cpp:
int main(int argc, char *argv[])
{
QApp a(argc, argv);
Widget w;
w.show();
QObject::connect(&a,
SIGNAL(mouseCoords
(int,
int,
int,
int,
int)),
&w,SLOT(mouseCoords(int, int, int, int, int)));
return a.exec();
}
int main(int argc, char *argv[])
{
QApp a(argc, argv);
Widget w;
w.show();
QObject::connect(&a,SIGNAL(mouseCoords(int, int, int, int, int)),
&w,SLOT(mouseCoords(int, int, int, int, int)));
return a.exec();
}
To copy to clipboard, switch view to plain text mode
qapp.cpp:
emit mouseCoord(get_raw_mouse_x_delta(i), get_raw_mouse_y_delta(i), // this is line 32...
is_raw_mouse_button_pressed(i, 0), is_raw_mouse_button_pressed(i, 1), is_raw_mouse_button_pressed(i, 2));
emit mouseCoord(get_raw_mouse_x_delta(i), get_raw_mouse_y_delta(i), // this is line 32...
is_raw_mouse_button_pressed(i, 0), is_raw_mouse_button_pressed(i, 1), is_raw_mouse_button_pressed(i, 2));
To copy to clipboard, switch view to plain text mode
I have searched the forum and found several issues quite like mine, but not enough to help me out.
Bookmarks