That's Wonderful .
1/2 of my problem 's been solved .

I've just noticed that when I drag & drop QStackedWidget using QT Design , Pages (instance of Widgets ) are created & added to the stacked widget .
I can add any number of pages I want & add the controls into it . I can control which widget to be displayed .
It works so great .

The second half of my problem :
- Whenever I try to declare instace of my .UI & add it to the QStackedWidget , Exception is appeared .
I've tried :
addWidget(WidgetObj);
widget(index );
insertWidget (index , WidgetObj);

CustomSlot's code that implements slots of the .UI & also has the QStackedWidget :

Qt Code:
  1. #include"CustomSlot2.h"
  2. #include "ui_Form2.h"
  3. #include "CustomSlot.h"
  4.  
  5.  
  6.  
  7. CustomSlot2::CustomSlot2(QWidget *parent): QWidget(parent)
  8. {
  9. formTwo.setupUi(this);
  10.  
  11. //CustomSlot is the class that implement the slots of the .UI that I want to add at QStackedWidget
  12. CustomSlot *CustomSlotObj ;
  13. //formTwo.stackedWidget->addWidget(CustomSlotObj);
  14.  
  15. // I've already just 2 pages at QStackedWidget , The third on is going to be in index 2
  16. formTwo.stackedWidget->insertWidget(2,CustomSlotObj);
  17.  
  18. QWidget *WidgetObj;
  19. WidgetObj= formTwo.stackedWidget->widget (2) ;
  20.  
  21.  
  22. WidgetObj->show();
  23.  
  24.  
  25. }
To copy to clipboard, switch view to plain text mode 


Thanks .