Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. windeployqt - Able to see console while running the application
Forum Updated to NodeBB v4.3 + New Features

windeployqt - Able to see console while running the application

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
23 Posts 6 Posters 5.7k Views 3 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.
  • dheerendraD dheerendra

    @dheerendra said in windeployqt - Able to see console while running the application:

    QT_LOGGING_RULES

    Set in the build environment of Qt Creator. Click on the projects on the left side bar. Select the appropriate kit. Go to Run settings. You will see vars like QTDIR, LOGNAME etc. Set the logging rule here.

    S Offline
    S Offline
    Sandhiya
    wrote on last edited by
    #9

    @dheerendra Variable:QT_LOGGING_RULES
    Value:qml=false
    Am I right?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #10

      Yes. It is right

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      S 1 Reply Last reply
      0
      • dheerendraD dheerendra

        Yes. It is right

        S Offline
        S Offline
        Sandhiya
        wrote on last edited by
        #11

        @dheerendra I tried setting the environmental variable, but still getting the console log along with the standalone application deployed using windeployqt tool.

        J.HilkJ 1 Reply Last reply
        0
        • S Sandhiya

          @dheerendra I tried setting the environmental variable, but still getting the console log along with the standalone application deployed using windeployqt tool.

          J.HilkJ Online
          J.HilkJ Online
          J.Hilk
          Moderators
          wrote on last edited by
          #12

          @Sandhiya
          did you do a complete rebuild? Delete the build folder or clean and rerun qmake

          if you add

          DEFINES += QT_NO_DEBUG_OUTPUT

          inside your profile it will disable qDebug() outputs, I'm however not sure if this also effects QML.


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          S 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @Sandhiya
            did you do a complete rebuild? Delete the build folder or clean and rerun qmake

            if you add

            DEFINES += QT_NO_DEBUG_OUTPUT

            inside your profile it will disable qDebug() outputs, I'm however not sure if this also effects QML.

            S Offline
            S Offline
            Sandhiya
            wrote on last edited by
            #13

            @J.Hilk Yeah tried complete rebuild.Still the same.
            DEFINES += QT_NO_DEBUG_OUTPUT has no effect on QML.Tried that one too

            1 Reply Last reply
            0
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Qt Champions 2022
              wrote on last edited by
              #14

              ![alt text](0_1548935724080_Screen Shot 2019-01-31 at 5.24.11 PM.png image url)

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              S 1 Reply Last reply
              1
              • dheerendraD dheerendra

                ![alt text](0_1548935724080_Screen Shot 2019-01-31 at 5.24.11 PM.png image url)

                S Offline
                S Offline
                Sandhiya
                wrote on last edited by
                #15

                @dheerendra I tried the same as mentioned in the above image. Still the same behavior.

                1 Reply Last reply
                0
                • dheerendraD Offline
                  dheerendraD Offline
                  dheerendra
                  Qt Champions 2022
                  wrote on last edited by
                  #16

                  Did you run qmake once after setting this parameter ?

                  Dheerendra
                  @Community Service
                  Certified Qt Specialist
                  http://www.pthinks.com

                  S 1 Reply Last reply
                  0
                  • dheerendraD dheerendra

                    Did you run qmake once after setting this parameter ?

                    S Offline
                    S Offline
                    Sandhiya
                    wrote on last edited by
                    #17

                    @dheerendra Yes I did.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Sandhiya
                      wrote on last edited by
                      #18

                      Able to figure out where exactly the problem is. The problem occurs because of adding
                      QT += qmltest
                      in .pro file. If I remove the above statement and try to build a standalone exe using windeployqt tool , only the application is getting launched without any console.
                      Can anyone help in solving this problem without commenting qmltest?

                      raven-worxR 1 Reply Last reply
                      0
                      • S Sandhiya

                        Able to figure out where exactly the problem is. The problem occurs because of adding
                        QT += qmltest
                        in .pro file. If I remove the above statement and try to build a standalone exe using windeployqt tool , only the application is getting launched without any console.
                        Can anyone help in solving this problem without commenting qmltest?

                        raven-worxR Offline
                        raven-worxR Offline
                        raven-worx
                        Moderators
                        wrote on last edited by
                        #19

                        @Sandhiya said in windeployqt - Able to see console while running the application:

                        Can anyone help in solving this problem without commenting qmltest?

                        why do you need this option when building a release application in the first place?

                        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                        If you have a question please use the forum so others can benefit from the solution in the future

                        S 1 Reply Last reply
                        1
                        • raven-worxR raven-worx

                          @Sandhiya said in windeployqt - Able to see console while running the application:

                          Can anyone help in solving this problem without commenting qmltest?

                          why do you need this option when building a release application in the first place?

                          S Offline
                          S Offline
                          Sandhiya
                          wrote on last edited by
                          #20

                          @raven-worx It's not needed. But when I try building the application in release mode /debug mode that flag by default will be there as part of my .pro file. Is there any way that can be ignored while build a release application?

                          raven-worxR 1 Reply Last reply
                          0
                          • S Sandhiya

                            @raven-worx It's not needed. But when I try building the application in release mode /debug mode that flag by default will be there as part of my .pro file. Is there any way that can be ignored while build a release application?

                            raven-worxR Offline
                            raven-worxR Offline
                            raven-worx
                            Moderators
                            wrote on last edited by
                            #21

                            @Sandhiya said in windeployqt - Able to see console while running the application:

                            But when I try building the application in release mode /debug mode that flag by default will be there as part of my .pro file.

                            not in common. What flags do you also add to the QT variable in your .pro file?

                            @Sandhiya said in windeployqt - Able to see console while running the application:

                            Is there any way that can be ignored while build a release application?

                            CONFIG(release, debug|release) {
                              QT -= qmltest
                            }
                            

                            But since you anyway do not need it simply remove it for all configurations.

                            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                            If you have a question please use the forum so others can benefit from the solution in the future

                            S 1 Reply Last reply
                            2
                            • raven-worxR raven-worx

                              @Sandhiya said in windeployqt - Able to see console while running the application:

                              But when I try building the application in release mode /debug mode that flag by default will be there as part of my .pro file.

                              not in common. What flags do you also add to the QT variable in your .pro file?

                              @Sandhiya said in windeployqt - Able to see console while running the application:

                              Is there any way that can be ignored while build a release application?

                              CONFIG(release, debug|release) {
                                QT -= qmltest
                              }
                              

                              But since you anyway do not need it simply remove it for all configurations.

                              S Offline
                              S Offline
                              Sandhiya
                              wrote on last edited by
                              #22

                              @raven-worx I tried using that flag and it helped. Thank you for the help

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                Sandhiya
                                wrote on last edited by
                                #23

                                When I tried to deploy the application in the target(Embedded linux) am still getting the console. Is there anything specific I need to do in that case?

                                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