
W pliku widget.h pod klasą wygenerowaną przez qt dodaje nową klase:
Kod: Zaznacz cały
.....
class ThreadReceive: public QThread
{
public:
void run();
ThreadReceive();
};
Kod: Zaznacz cały
...
void ThreadReceive::run()
{
char x = 0xAA;
emit received(x);
}
Kod: Zaznacz cały
ThreadReceive thread;
ThreadReceive does not name a type
a jeżeli stworze obiekt tak (tzn wskaźnik):
Kod: Zaznacz cały
ThreadReceive *thread;
1:ISO C++ forbids declaration of ThreadReceive with no type
2:expected ';' before '*' token
Oczywiście błędy w obu przypadkach dotyczą lini w której znajduja się ThreadReceive thread / *thread
Co robie źle
