I have two classes : classA and classB

I would like to connect a function F() from classB with a click event from a button ui of the classA.

I know there is the possibitlity to have the classB member of the class A. But there is another to do it if the class are separe?

The connect function shoud be in the class A connect(ui->button,SIGNAL(clicked(),b->F())); ???

Qt Code:
  1. class classA : public QWidget
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. classA(QWidget *parent = 0);
  7. ~classA();
  8.  
  9. private:
  10. Ui::board *ui;
  11. };
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. class classB: public QWidget
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. classB(QWidget *parent = 0);
  7. ~classB();
  8. void F();
  9. };
To copy to clipboard, switch view to plain text mode