Not a signal or slot declaration: ??
-
What am I doing wrong ( this time ) ?
Here is the complaint
/mnt/sde5/QT_PROGRAMS_FULL/MDI_BT/MDI_BT/SUB_FT857/mainwindow_sub_ft857.h:130: Error: Not a signal or slot declaration
and here is the source of the error
public slots:
void static SCANStarted(void);Hope it is not the "static" keyword messing things up.
Requested by compiler for yet unknown reason - hopefully not the source of he error and to be investigated lalter.
Cheers,,,just the facts ma'am..
-
a slot can not be static.
-
@Christian-Ehrlicher said in Not a signal or slot declaration: ??:
a slot can not be static.
hence how do I fix this ?
/mnt/sde5/QT_PROGRAMS_FULL/MDI_BT/MDI_BT/SUB_FT857/mainwindow_sub_ft857.cpp:34: error: invalid use of non-static member function ‘void MainWindow_SUB_FT857::SCANStarted()’
/mnt/sde5/QT_PROGRAMS_FULL/MDI_BT/MDI_BT/SUB_FT857/mainwindow_sub_ft857.cpp: In constructor ‘MainWindow_SUB_FT857::MainWindow_SUB_FT857(QWidget*)’:
/mnt/sde5/QT_PROGRAMS_FULL/MDI_BT/MDI_BT/SUB_FT857/mainwindow_sub_ft857.cpp:34:60: error: invalid use of non-static member function ‘void MainWindow_SUB_FT857::SCANStarted()’
34 | connect(watcher, &QFutureWatcher<int>::started, this, SCANStarted);
| ^~~~~~~~~~~ -
??
-
Use e.g. a lambda - already told and shown you multiple times.
-
@AnneRanch
Depends what classthis
is and what class theSCANStarted
slot is in.Maybe @Christian-Ehrlicher already knows those, I don't.
-
Your connect statement should be (add the class to the slot):
connect(watcher, &QFutureWatcher<int>::started, this, &MainWindow_SUB_FT857::SCANStarted);