Good Day,

I have created a mainWindow with a button to create a new sub-form.
This sub-form can be created multiple times depending on how many times the push button was clicked.
and each sub-form loads a user specified image.

Qt Code:
  1. #include <QMainWindow>
  2. #include "miniFormClass.h"
  3.  
  4. namespace Ui {
  5. class MainWindow;
  6. }
  7.  
  8. class MainWindow : public QMainWindow
  9. {
  10. Q_OBJECT
  11.  
  12. public:
  13. explicit MainWindow(QWidget *parent = 0);
  14. ~MainWindow();
  15.  
  16. private:
  17. Ui::MainWindow *ui;
  18. miniFormClass* msWindow;
  19. ...
To copy to clipboard, switch view to plain text mode 

and
Qt Code:
  1. //On Push Button clicked
  2. msWindow = new miniFormClass(this);
  3. msWindow->show();
  4. msWindow->callDialogUploadImage();
To copy to clipboard, switch view to plain text mode 


My Problem:
I need a way of keeping track which sub-form has focus, and I need to access certain member variables from that sub-form only, ignoring the other sub-forms until the user changes focus to another sub-form

Whats the way forward...
Thanks in advance