connect ( tab class , SIGNAL tab class signal "finshed", MainWindow class , SLOT set "statusBar (message )
Again, you need to read the Qt documentation on signals and slots so you can understand how they work. Look at the Qt examples to see how they are used in real code.

The C++ function signature for a slot must match the function signature for the signal. In other words, your slot can't be defined with an argument that does not exist in the signal (like your 'message' argument). If a class emits a signal with no arguments, the signal / slot mechanism can't just make something up to put in the argument defined for the slot it is connected to.

So if you want a widget in one of your tabs to send a string (message) back to your main window so the main window can display it in the status bar, then you need do do several things:

1 - define a signal in your widget with a suitable name (sendStatus maybe) and a QString argument: void sendStatus( const QString & message )
2 - define a slot in your MainWindow class with the same signature (void displayStatusMessage( const QString & message ))
3 - implement code in this slot to display the string argument (message) in the status bar
4 - when you create the widget for the tab, connect the widget's signal to the main window's slot.
5 - when your widget wants to display a status message, call "emit sendStatus( "Here is a message" );" Since that signal is now connected to the main window's slot, the slot will take care of displaying it

The main window's slot should look something like this:

Qt Code:
  1. // MainWindow.h
  2.  
  3. class MainWindow : public QMainWindow
  4. {
  5. Q_OBJECT
  6.  
  7. // ...
  8.  
  9. protected slots:
  10. void displayStatusMessage( const QString & message );
  11.  
  12. // ...
  13. };
  14.  
  15. // MainWindow.cpp
  16.  
  17. // MainWindow constructor:
  18. {
  19. //...
  20.  
  21. MyWidget * pWidget = new MyWidget();
  22. myTabWidget->addTab( myWidget, "My Widget" );
  23.  
  24. connect( pWidget, SIGNAL( sendStatus( const QString & ) ), this, SLOT( displayStatusMessage( const QString & ) ) );
  25.  
  26. // ...
  27. }
  28.  
  29. void MainWindow::displayStatusMessage( const QString & message )
  30. {
  31. QStatusBar * pStatusBar = statusBar();
  32. pStatusBar->showMessage( message, 5000 ); // A 5 second timeout
  33. }
To copy to clipboard, switch view to plain text mode 

Alternatively, since QStatusBar::showMessage() is a slot itself, you could connect this slot directly to your widget's signal, which will cause it to display with a zero timeout. In this case, the message will be displayed until it is cleared or replaced by some other new message, either from your code or frfom a tooltip (which also uses the status bar):

Qt Code:
  1. // MainWindow constructor
  2.  
  3. MyWidget * pWidget = new MyWidget();
  4. myTabWidget->addTab( myWidget, "My Widget" );
  5.  
  6. QStatusBar * pStatusBar = statusBar();
  7. connect( pWidget, SIGNAL( sendStatus( const QString & ) ), pStatusBar, SLOT( showMessage( const QString & ) ) );
To copy to clipboard, switch view to plain text mode 

This works even though the slot has an extra argument which defaults to zero.

Remember, code for signals is automatically created by the MOC compiler. All you have to do is declare the signal in your widget class and that's it:

Qt Code:
  1. // MyWidget.h
  2.  
  3. class MyWidget : public QWidget
  4. {
  5. Q_OBJECT
  6.  
  7. // ...
  8. signals:
  9. void sendStatus( const QString & status );
  10.  
  11. //...
  12. };
  13.  
  14. // NOTHING goes in MyWidget.cpp to implement this signal.
To copy to clipboard, switch view to plain text mode 

Any place in MyWidget where you want to update the status, you simply do this:

Qt Code:
  1. void MyWidget::SomeMethod()
  2. {
  3. emit sendStatus( "Status from SomeMethod" );
  4. }
To copy to clipboard, switch view to plain text mode 

Also remember that signals and slots both have void return values. You cannot return anything from a slot unless you pass an argument that is either a pointer or a reference that the slot can modify:

Qt Code:
  1. signals:
  2. void someSignal( int & returnValue );
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. public slots:
  2. void someSlot( int & returnValue )
  3. {
  4. returnValue = 42;
  5. }
To copy to clipboard, switch view to plain text mode 

Just remember that if the same signal is connected to more than one slot, the -last- slot to handle the signal will wipe out any value set by previous slots.