Results 1 to 2 of 2

Thread: Please help me qt browser

  1. #1
    Join Date
    Jul 2012
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Please help me qt browser

    Hi,
    I am new qt programmer. I make a program run qt_browser demos. I use this program to call this part code:

    Q_INIT_RESOURCE(data);
    BrowserApplication application(qtArgc, (char**)qtArgv);
    if (!application.isTheOnlyBrowser())
    return 0;
    application.newMainWindow();
    exit = application.exec();

    I call the first, it is OK, but when I close mainwindows and call again, it do not run and display "WARNING: QApplication was not created in the main() thread"
    , then system is quited.
    Anyone help me?
    Thanhs

  2. The following user says thank you to nguahoang205 for this useful post:


  3. #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: Please help me qt browser

    The warning is clear enough; do not create the QApplication instance, in this case BrowserApplication I guess, outside the main (primary) thread. Since you don't show us how you are using threads we cannot really help you with your atypical Qt code.

  4. The following user says thank you to ChrisW67 for this useful post:


Similar Threads

  1. Replies: 0
    Last Post: 17th March 2011, 03:17
  2. Help with property browser
    By Jsvc in forum Qt Programming
    Replies: 2
    Last Post: 3rd October 2010, 01:49
  3. Not able to run fancy browser and demo browser example applications
    By GoGetIt in forum Installation and Deployment
    Replies: 1
    Last Post: 16th August 2010, 06:23
  4. Value Browser 3
    By Arsen in forum Qt-based Software
    Replies: 7
    Last Post: 27th December 2007, 14:12
  5. Web browser on Mac OS
    By pkloc in forum Qt Programming
    Replies: 2
    Last Post: 22nd March 2007, 01:21

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.