Results 1 to 4 of 4

Thread: Creating a Window help

  1. #1
    Join Date
    Jul 2010
    Posts
    18
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Windows

    Default Creating a Window help

    now i am trying another example and something weird is going on here

    this is my example in main.cpp
    Qt Code:
    1. #include <QtGui>
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication app(argc, argv);
    6. QWidget window;
    7. window.resize(320, 240);
    8. window.show();
    9. window.setWindowTitle(
    10. QApplication::translate("toplevel", "Top-level widget"));
    11. return app.exec();
    12. }
    To copy to clipboard, switch view to plain text mode 
    above code worked fine on first couple of run
    but when i change
    Qt Code:
    1. window.resize(320,240);
    To copy to clipboard, switch view to plain text mode 
    to
    Qt Code:
    1. window.resize(20,240);
    To copy to clipboard, switch view to plain text mode 

    it didnt work and displayed error which is this in compile output tab
    Qt Code:
    1. Running build steps for project creatingWindow...
    2. Configuration unchanged, skipping qmake step.
    3. Starting: "C:/Qt/2010.04/mingw/bin/mingw32-make.exe" -w
    4. mingw32-make: Entering directory `C:/Qt/2010.04/examples/creatingWindow-build-desktop'
    5. C:/Qt/2010.04/mingw/bin/mingw32-make -f Makefile.Debug
    6. mingw32-make[1]: Entering directory `C:/Qt/2010.04/examples/creatingWindow-build-desktop'
    7. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\qt\include\QtCore" -I"..\..\qt\include\QtGui" -I"..\..\qt\include" -I"..\..\qt\include\ActiveQt" -I"debug" -I"." -I"..\creatingWindow" -I"." -I"..\..\qt\mkspecs\win32-g++" -o debug\main.o ..\creatingWindow\main.cpp
    8. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\creatingWindow.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -L"c:\Qt\2010.04\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
    9. mingw32-make[1]: Leaving directory `C:/Qt/2010.04/examples/creatingWindow-build-desktop'
    10. mingw32-make: Leaving directory `C:/Qt/2010.04/examples/creatingWindow-build-desktop'
    11. mingw32-make[1]: *** [debug\creatingWindow.exe] Error 1
    12. mingw32-make: *** [debug] Error 2
    13. The process "C:/Qt/2010.04/mingw/bin/mingw32-make.exe" exited with code %2.
    14. Error while building project creatingWindow (target: Desktop)
    15. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 

    and when i change it back to original example code then again it display this error. on the first two executions it worked but then it fails.

    help please?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Creating a Window help

    Check to make sure there is no running instance of the application holding a lock on the exe file.

  3. #3
    Join Date
    Jul 2010
    Posts
    18
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Windows

    Default Re: Creating a Window help

    can you please tell me where can i check in Qt Creator?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Creating a Window help

    Quote Originally Posted by doforumda View Post
    can you please tell me where can i check in Qt Creator?
    I'd really suggest you rethink this question... Take as much time as you need until you understand what I mean.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 9
    Last Post: 16th May 2010, 16:21
  2. Replies: 2
    Last Post: 10th December 2009, 07:01
  3. Changing window states breaks window manager
    By sebastian.f in forum Newbie
    Replies: 3
    Last Post: 30th June 2009, 14:40
  4. Creating a Main Window Application
    By gt.beta2 in forum Qt Tools
    Replies: 13
    Last Post: 24th February 2009, 19:45
  5. Replies: 11
    Last Post: 4th June 2008, 07:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.