Quote Originally Posted by stampede View Post
SLOT must be a non-static member of a class, which have the Q_OBJECT macro in private section. You haven't satisfied any of those two requirements.

This is wrong, "timeout()" signal belongs to QTimer object, so first parameter must be a pointer to QTimer object.
You can solve this easily by introducing a SLOT in MainWindow class (or whatever other "main" class):
Qt Code:
  1. #include "global.h"
  2.  
  3. class MainWindow : public QSomething{
  4. Q_OBJECT
  5. /*...*/
  6. protected slots:
  7. void checkConnection(){
  8. bool check = Global::connected_to_internet();
  9. doSomething(check);
  10. }
  11. };
To copy to clipboard, switch view to plain text mode 
Then simply connect the timer to this slot.
Your connect statement is wrong, you cant connect to "class", you need to have an instance to connect to.
Thanks, it would be nice if connect() was more flexible, though.