Results 1 to 3 of 3

Thread: Qt Creator hang with certain source files

  1. #1
    Join Date
    May 2011

    Default Qt Creator hang with certain source files

    I am experiencing "no respond" with Qt Creator when editing certain source file.
    I compiled Qt using Visual Studio 2010, and is doing fine with many example/demo projects, but sometimes when I try some code example from the web, while in the code editor, Qt creator just "hang", no respond, no cursor when moved within the Qt Creator's window, sometimes it response after sever minutes, sometimes it just ever response and must be killed by using the task manager's "End Process" command on Windows.

    My config is Windows 7 64 bit, Qt Creator 2.1, Qt 4.7.1 (32 bit).

    For instance, this source file always "hang" after some random seconds:

    In pro file:

    SOURCES += \

    In the Program.cpp:

    #include "QtGui\QtGui"

    void loadModules(){}

    int main(int argc, char *argv[])
    QApplication app(argc, argv);
    QSplashScreen *splash = new QSplashScreen;
    splash->setPixmap(QPixmap("C:\\Users\MyUserName\\Desktop\ \Splash.bmp"));

    Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
    splash->showMessage(QObject::tr("Setting up the main window..."), topRight, Qt::white);

    QMainWindow mainWin;
    splash->showMessage(QObject::tr("Loading modules..."),topRight, Qt::white);
    delete splash;
    return app.exec();

  2. #2
    Join Date
    May 2011
    Thanked 35 Times in 35 Posts
    Qt products
    Unix/X11 Symbian S60

    Default Re: Qt Creator hang with certain source files

    I have no idea why that would hang, but I would try to find out where anythings hangs in this way:
    * Delete the second half of source code and try again (perhaps delecting just the code insides methods if it is a class, or just half of the contents of a function, like in this case, main() -- that is probably obvious)
    * If it doesn't hang, delete the other half and try again
    * Now it is known, which half has the problem
    * Doing the deleting in the same manner will eventually (hopefully) reveal the block of code that causes the hanging

    (Just one note about: #include "QtGui\QtGui" -- I would use a forward slash -- backward slashes would require repeating -> \\ . Even this may be the reason.)

  3. #3
    Join Date
    Jul 2009
    Qt products
    Qt3 Qt4 Qt/Embedded
    MacOS X Unix/X11 Windows

    Default Re: Qt Creator hang with certain source files

    Hi mvuori. Even I am facing the same issue while editing source files related to Qt Tests. Did you find the issue for your problem? Please share if it is solved. thanks

Similar Threads

  1. Replies: 4
    Last Post: 25th December 2010, 17:20
  2. Qt Creator How to make Creator be aware of the Qt source code project?
    By kartwall in forum Qt Tools
    Replies: 5
    Last Post: 27th September 2010, 09:39
  3. Have Creator open source files with project
    By Asperamanca in forum Qt Tools
    Replies: 2
    Last Post: 23rd October 2009, 09:25
  4. Multiple source files per ui
    By squidge in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2009, 18:32
  5. Platform dependent source files: what is best?
    By ucomesdag in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2006, 19:52


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.