Guest User

Untitled

a guest
Jul 27th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef IDPRINTER_H
  2. #define IDPRINTER_H
  3. #include <QObject>
  4. #include <QThread>
  5. #include <iostream>
  6. class IDPrinter : public QObject{
  7.     Q_OBJECT
  8.     int _id;
  9. public:
  10.     explicit IDPrinter(int id):
  11.         _id(id)
  12.     {}
  13. public slots:
  14.     void print(){
  15.         forever{
  16.             std::cout << _id << std::endl;
  17.         }
  18.     }
  19. };
  20. #endif // IDPRINTER_H
Add Comment
Please, Sign In to add comment