Qt-interest Archive, April 2008
Re: Windows: keep console app from showing on task bar?
Message 1 in thread
Arvid Ephraim Picciani wrote:
> On Monday 31 March 2008 23:35:05 Paul Miller wrote:
>
>> This is a short-lived little program. I don't want to go through all the
>> work of having to register it as a server and stuff.
>
> the console window only apears if apps are flaged for it, but no clue what the
> exact flag is
> hmmm maybe try compiling as a GUI app, then open contruct a QWidget but never
> show(); it. this should make the mainloop work as a win32 gui app. Of course
> the user will get confused and click the icon multiple times.
Here is what I found. I'm actually launching the app with ShellExecute()
from within another Qt program. If I pass SW_HIDE to ShellExecute, the
console app doesn't show up at all. Exactly what I was looking for,
though it wasn't obvious from my question (since I thought I'd have to
do some magic on the console app's side).
--
[ signature omitted ]
Message 2 in thread
If you have
QT += console
in your qmake .pro file, then you'll see a console window when you run
your app from a windowmanager. Just get rid of it from your make file.
If you are using MS visual studio and the project already exists, you
can change it from a console to non-console or vice-versa this way:
project properties - configuration properties - linker - system
subsystem: CONSOLE (/SUBSYSTEM:CONSOLE)
(or /SUBSYSTEM:WINDOWS)
On Mon, Mar 31, 2008 at 1:37 PM, Arvid Ephraim Picciani
<aep@xxxxxxxxxxxxxxx> wrote:
> On Monday 31 March 2008 23:35:05 Paul Miller wrote:
>
> > This is a short-lived little program. I don't want to go through all the
> > work of having to register it as a server and stuff.
>
> the console window only apears if apps are flaged for it, but no clue what the
> exact flag is
> hmmm maybe try compiling as a GUI app, then open contruct a QWidget but never
> show(); it. this should make the mainloop work as a win32 gui app. Of course
> the user will get confused and click the icon multiple times.
>
--
[ signature omitted ]