Hi.

I'm trying the auto-connect feature in my code but i don't arrive to get it working.

this is my code:

File .h
Qt Code:
  1. class TBarAffichage : public QToolBar{
  2. Q_OBJECT
  3. private:
  4. TColorComboBox* CBoxTraitCouleurs;
  5. ....
  6. private Q_SLOTS:
  7. void on_CBoxTraitCouleurs_activated(int);
  8. ....
  9. };
To copy to clipboard, switch view to plain text mode 
File .cpp:
Qt Code:
  1. TBarAffichage::TBarAffichage(QWidget *parent):
  2. QToolBar(parent),
  3. CBoxTraitCouleurs (new TColorComboBox(this)) {}
  4. ...
  5. void TBarAffichage::on_CBoxTraitCouleurs_activated(int i){
  6. qDebug() << "activated";
  7. }
  8. ...
To copy to clipboard, switch view to plain text mode 
The TColorComboBox.h:
Qt Code:
  1. class TColorComboBox : public QComboBox{
  2. Q_OBJECT
  3. public:
  4. TColorComboBox(QWidget *widget = 0):QComboBox(widget){}
  5. };
To copy to clipboard, switch view to plain text mode 

When i select the color combobox (CBoxTraitCouleurs) and change it (from red to white) the qDebug isn't launched.
I've tried with others objects and signals but nothing works.

What i'm doing wrong?
I've to put something into the .pro?
I've to add something to the constructor?

Thanks