If you need interaction between two dialogs use the singleton pattern :
mydialog.h
	
	- #include <QtCore> 
- #include <QtGui> 
-   
- { 
-    Q_OBJECT 
-   
-    public: 
-    static mydialog* Instance() 
-   
-    // your stuffs here 
-   
-   private: 
-     static mydialog *inst; 
- } 
        #include <QtCore>
#include <QtGui>
class mydialog : public QDialog
{
   Q_OBJECT
   
   public:
   static mydialog* Instance()
   // your stuffs here
  private:
    static mydialog *inst;
}
To copy to clipboard, switch view to plain text mode 
  
mydialog.cpp
	
	- mydialog mydialog:: *inst = 0; 
-   
- mydialog* mydialog::Instance() 
- { 
- if (inst == 0) 
-   inst = new mydialog; 
- return inst; 
- } 
        mydialog mydialog:: *inst = 0;
mydialog* mydialog::Instance()
{
if (inst == 0)
  inst = new mydialog;
return inst;
}
To copy to clipboard, switch view to plain text mode 
  
constructors and destructors are declared private
				
			
Bookmarks