I I have code this below but I have and error on 1th connect
Qt Code:
  1. mywidget.cpp(113): error C2664: 'bool QObject::connect(const QObject *,const char *,const QObject *,const char *)' : cannot convert parameter 3 from 'myMainForm *' to 'const QObject *'
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. //constructor of MyWidget class
  2. w = (MainForm*)this->topLevelWidget();
  3. myw= (myMainForm*)this->topLevelWidget();
  4. connect(this, SIGNAL(myUpdate()), myw, SLOT(myUpdateWidgets()) );
  5. connect(this, SIGNAL(myUpdate()), w, SLOT(updateWidgets()) );
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. class MyWidget {
  2. MainForm* w;
  3. myMainForm* myw;
  4. }
To copy to clipboard, switch view to plain text mode 
The 2nd connect works properly; Why this error on 1th? Isn't it the same? Thanks