Results 1 to 16 of 16

Thread: Shell opens when start Qt app

  1. #1
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Shell opens when start Qt app

    I have a very simple question.
    I developed an application for Windows.
    But when I run the application a commands shell opens...
    It will be quite nice if no shell will open at all.
    I compiled with make release.
    Why?

  2. #2
    Join Date
    Jan 2006
    Location
    Boston, MA
    Posts
    40
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    Check for console option in your .pro file.

  3. #3
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    There is no console option altogether....

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    try to do this in pro-file
    ...
    CONFIG -= console
    ...
    do you use VS? if yes then go to "Project->Project Properties->Configuration Properties->Linker->System" and change "Sub System" from "Console" to "Windows".
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. #5
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    I use mingw + qcreator.
    I tried CONFIG -= console but nothing....

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Shell opens when start Qt app

    Make sure to rebuild the application.
    J-P Nurmi

  7. #7
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    I did it two times with make distclean and qmake. But no luck.
    Maybe thereis something in my code? I use qDebug() sometimes....
    G

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Shell opens when start Qt app

    Are you using Visual Studio? If so, did you re-generate the VS project?
    J-P Nurmi

  9. #9
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    No , I use shell of windows.
    G

  10. #10
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Shell opens when start Qt app

    Could you attach the project?
    J-P Nurmi

  11. #11
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    Qt Code:
    1. SOURCES += main.cpp \
    2. myplot.cpp \
    3. spa.cpp \
    4. mymath.cpp \
    5. mainwindow.cpp \
    6. optimumplot.cpp \
    7. radiazionereale.cpp \
    8. settings.cpp \
    9. gridset.cpp \
    10. albedo.cpp \
    11. linearinter.cpp \
    12. modelsettings.cpp
    13. TEMPLATE = app
    14. CONFIG += warn_on \
    15. thread \
    16. qt \
    17. debug_and_release \
    18. qtestlib
    19. CONFIG -= console
    20. TARGET = /solar
    21. HEADERS += myplot.h \
    22. spa.h \
    23. mymath.h \
    24. mainwindow.h \
    25. optimumplot.h \
    26. radiazioneReale.h \
    27. settings.h \
    28. gridset.h \
    29. albedo.h \
    30. linearinter.h \
    31. modelsettings.h
    32. INCLUDEPATH += $(QWT)/src
    33. DEPENDPATH += $(QWT)/src
    34. LIBS += -L$(QWT)/lib \
    35. -lqwt5
    36. QMAKE_CXXFLAGS_DEBUG += -g \
    37. -fno-inline \
    38. -O0
    39. QMAKE_CXXFLAGS_RELEASE += -g \
    40. -02 \
    41. -fno-inline
    42. QT += sql \
    43. svg
    44. DISTFILES += del
    45. RESOURCES += resource.qrc
    46. FORMS += settings.ui \
    47. gridset.ui \
    48. albedo.ui \
    49. modelsettings.ui
    50. DEFINES += QWT_DLL \
    51. QT_DLL
    52. RC_FILE = solar.rc
    To copy to clipboard, switch view to plain text mode 

  12. #12
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    Nobody can help me in order to run windows app without the shell?
    It is quite unpleasant having the shell....

    Regards

  13. #13
    Join Date
    Feb 2008
    Posts
    157
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    Are you using debug mode? I always have a shell in debug mode (for debugging output), but not in release mode.

  14. #14
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    What should I do?
    I shall remove debug_and_release from the .pro file? And put only release?
    I don't know if it does work....I am compiling right now from scratch.
    Ths

  15. #15
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Shell opens when start Qt app

    Please, somebody can help me with this problem?
    G

  16. #16
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Shell opens when start Qt app

    The console gets enabled because you have "CONFIG += qtestlib".
    J-P Nurmi

  17. The following user says thank you to jpn for this useful post:

    giusepped (2nd February 2009)

Similar Threads

  1. Questions about kill() and start() of QProcess
    By mp33919 in forum Qt Programming
    Replies: 5
    Last Post: 23rd June 2007, 13:00

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.