
Originally Posted by
artt
I have looked for signals yesterday, and saw such sample
Right, just declare a signal and emit it in run.
The code creating the thread object can then connec this signal to its own slot or to the slot of another class.
E.g. if you had a signal like this
signals:
void updateText
(const QString &text
);
signals:
void updateText(const QString &text);
To copy to clipboard, switch view to plain text mode
one could directly connect it to a label that should show that text
connect(thread,
SIGNAL(updateText
(QString)), label,
SLOT(setText
(QString)));
connect(thread, SIGNAL(updateText(QString)), label, SLOT(setText(QString)));
To copy to clipboard, switch view to plain text mode

Originally Posted by
artt
2. what 2 last point?

Originally Posted by
anda_skoa
- don't call any methods of Lister in the threads
- put code that you want the threads to execute into the thread classes
Bookmarks