hai ,

what's my problem is close one form and open another after some time interval.
i have written following code as follows.
Qt Code:
  1. #include "ui_Screen3.h"
  2. #include "ui_Screen5.h"
  3. #include <QApplication>
  4. #include <QObject>
  5. #include <QTableWidgetItem>
  6. #include <QTableWidget>
  7. #include <QTimer>
  8.  
  9. int main(int argc, char *argv[])
  10. {
  11. QApplication app(argc, argv);
  12. QWidget *window = new QWidget;
  13. QWidget *window1 = new QWidget;
  14. QTimer *timer = new QTimer;
  15. Ui::Form1 ui;
  16. Ui::Form ui1;
  17. ui.setupUi(window);
  18. ui1.setupUi(window1);
  19.  
  20. window1->show();
  21.  
  22.  
  23. QObject::connect(timer, SIGNAL(timeout()), window1, SLOT(hide()));
  24. timer->start(1000);
  25. QObject::connect(window1, SIGNAL(hide()), window, SLOT(show()));
  26. return app.exec();
  27. }
To copy to clipboard, switch view to plain text mode 

i was gettting following error
Qt Code:
  1. C:\Qt\new>make
  2. mingw32-make -f Makefile.Release
  3. mingw32-make[1]: Entering directory `C:/Qt/new'
  4. g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
  5. LL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
  6. -I"C:/Qt/4.1.1/include/QtCore" -I"C:/Qt/4.1.1/include/QtGui" -I"C:/Qt/4.1.1/inc
  7. lude" -I"." -I"C:/Qt/4.1.1/include/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.1/mk
  8. specs/win32-g++" -o release\main.o main.cpp
  9. main.cpp:33:6: warning: no newline at end of file
  10. g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
  11. ime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "release\new.exe" relea
  12. se\main.o -L"C:\Qt\4.1.1\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
  13. C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot ope
  14. n output file release\new.exe: Permission denied
  15. collect2: ld returned 1 exit status
  16. mingw32-make[1]: *** [release\new.exe] Error 1
  17. mingw32-make[1]: Leaving directory `C:/Qt/new'
  18. mingw32-make: *** [release] Error 2
To copy to clipboard, switch view to plain text mode 


please help give me any clue to go forward.

bye
basha