Results 1 to 3 of 3

Thread: Trying to use QtCreator with non-QT window, without a console.

  1. #1
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Trying to use QtCreator with non-QT window, without a console.

    My project consists of two programs - one QT, one non-QT. I want to code them both using QtCreator.

    My problem: I need to make a program using QtCreator without any QT dependencies, and without a console window.

    My .pro file:
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2010-12-22T21:58:04
    4. #
    5. #-------------------------------------------------
    6.  
    7. #QT += core
    8.  
    9. #QT -= gui \
    10. # core
    11.  
    12. #Executable name:
    13. TARGET = Game
    14. #Folder to stick the executable in:
    15. DESTDIR = "../../Bin"
    16.  
    17. CONFIG -= app_bundle
    18.  
    19. TEMPLATE = app
    20.  
    21. #A custom define I'm using.
    22. DEFINES = COMMON_USING_SFML
    23.  
    24. INCLUDEPATH = .......
    25.  
    26. LIBS = .......
    27.  
    28. SOURCES = \
    29. ........
    30.  
    31. HEADERS = \
    32. ........
    To copy to clipboard, switch view to plain text mode 

    Also, in the "Project" sidebar button, under "Build Settings", I added to MingW '-mwindows' command.

    Here's my settings:


    I really apreciate your help.

    Thought: Is the console window showing up, merely because I haven't yet coded an actual window yet?

    Thought 2: Did I put the '-mwindows' flag in the right spot?

  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: Trying to use QtCreator with non-QT window, without a console.

    I don't see why the "-m windows" option is required at all, especially since it is ignored by MingW's GNU make.

    Regarding the Qt dependency:
    Qt Code:
    1. CONFIG -= qt
    To copy to clipboard, switch view to plain text mode 
    suppresses Qt libraries, and:
    Qt Code:
    1. CONFIG -= console
    To copy to clipboard, switch view to plain text mode 
    to suppress the console on Windows (although it may be suppressed just by excluding Qt libraries). The app_bundle option only means something on Mas OS X.

  3. #3
    Join Date
    Apr 2009
    Location
    www.JaminGrey.com
    Posts
    71
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Trying to use QtCreator with non-QT window, without a console.

    Thanks, that works. Oddly, I was pretty sure I tried that previously, but I guess it required a rebuild.

    Thank you!

Similar Threads

  1. Simulating a console window
    By Doug Broadwell in forum Newbie
    Replies: 3
    Last Post: 18th February 2011, 15:30
  2. Console window?
    By waynew in forum Qt Programming
    Replies: 6
    Last Post: 22nd April 2010, 22:27
  3. Replies: 3
    Last Post: 26th March 2010, 21:25
  4. Why there is not console window?
    By HelloDan in forum Qt Programming
    Replies: 2
    Last Post: 8th April 2009, 16:02
  5. qt without console window
    By jh in forum Qt Programming
    Replies: 3
    Last Post: 28th January 2006, 20:01

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.