Having this code is possible to emit the progressTextChanged(QString) signal? i have tried but i when trying to access the signal the compiler says it is protected.

Qt Code:
  1. //...
  2. //...
  3. QFuture<bool> future = QtConcurrent::run(
  4. this,
  5. &MyClass::runTheTask );
  6.  
  7. QFutureWatcher<bool> watcher;
  8. connect( &watcher, SIGNAL( progressTextChanged( const QString ) ),
  9. this, SLOT( appendMessageToStatusLineEdit( const QString ) ) );
  10. watcher.setFuture( future );
  11. future.waitForFinished();
  12.  
  13. // ...
  14. // ...
To copy to clipboard, switch view to plain text mode 



Qt Code:
  1. bool MyClass::runTheTask()
  2. {
  3. // do the task
  4.  
  5.  
  6.  
  7. // how to emit progress text signal???
  8. }
  9.  
  10. void MyClass::appendMessageToStatusLineEdit( const QString msg )
  11. {
  12. QMetaObject::invokeMethod( this,
  13. "doAppendMessageToStatusLineEdit",
  14. Qt::QueuedConnection,
  15. Q_ARG( QString, msg ) );
  16. }
  17.  
  18. void MyClass::doAppendMessageToStatusLineEdit( const QString msg )
  19. {
  20. _ui->statusTextEdit->append( msg );
  21. }
To copy to clipboard, switch view to plain text mode