Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to hide console application
Forum Updated to NodeBB v4.3 + New Features

How to hide console application

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 25.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tf25
    wrote on 6 Sept 2012, 21:27 last edited by
    #1

    Hi,

    I just have a small console application, which is doing some pretty short term things and closes afterwards. Every time I start this application, the console window shows up for a very short time. I just don't want to see it anymore.

    How can I hide the console window?

    (Using Windows 7 64bit and Windows XP Pro)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sam
      wrote on 6 Sept 2012, 22:23 last edited by
      #2

      Check if this solves your problem

      Goto Projects->Run Settings and see if Run in terminal is checked . If checked then uncheck it and run the application again.

      Try if this works.

      Regards
      Soumitra.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tf25
        wrote on 6 Sept 2012, 23:12 last edited by
        #3

        Sorry cannot find a "Run in terminal" checkbox.

        Did I understand you right?
        You want me to click onto the Project Button between Debug and analyze right? (Just guessing the names of the buttons. Actually I'm using a German version of QtCreator)

        There is no special Settings Button and there is also no checkbox called "Run in terminal"

        1 Reply Last reply
        0
        • N Offline
          N Offline
          Novynn
          wrote on 6 Sept 2012, 23:33 last edited by
          #4

          For windows, you can use the "FreeConsole":http://msdn.microsoft.com/en-us/library/windows/desktop/ms683150.aspx native function.

          It may flicker when the application is first activated, but should do the trick. Use "AllocConsole":http://msdn.microsoft.com/en-us/library/windows/desktop/ms681944.aspx to remake it if you need.

          1 Reply Last reply
          1
          • A Offline
            A Offline
            andre
            wrote on 7 Sept 2012, 07:44 last edited by
            #5

            Check to see if your .pro file has this in it:
            @
            CONFIG += CONSOLE
            @

            If you find this, remove it. Then re-run qmake, and rebuild your application. That should get rid of the window.

            A 1 Reply Last reply 7 Aug 2022, 19:43
            1
            • T Offline
              T Offline
              tf25
              wrote on 8 Sept 2012, 16:19 last edited by
              #6

              Great! To remove CONFIG += CONSOLE is the solution!

              Thanks a lot!!

              1 Reply Last reply
              0
              • A andre
                7 Sept 2012, 07:44

                Check to see if your .pro file has this in it:
                @
                CONFIG += CONSOLE
                @

                If you find this, remove it. Then re-run qmake, and rebuild your application. That should get rid of the window.

                A Offline
                A Offline
                ali-aydin
                wrote on 7 Aug 2022, 19:43 last edited by
                #7

                @andre
                it is not working for me

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved