Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef IDPRINTER_H
- #define IDPRINTER_H
- #include <QObject>
- #include <QThread>
- #include <iostream>
- class IDPrinter : public QObject{
- Q_OBJECT
- int _id;
- public:
- explicit IDPrinter(int id):
- _id(id)
- {}
- public slots:
- void print(){
- forever{
- std::cout << _id << std::endl;
- }
- }
- };
- #endif // IDPRINTER_H
Add Comment
Please, Sign In to add comment