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. Console appeare in release mode using QT MSVC 2015
Forum Updated to NodeBB v4.3 + New Features

Console appeare in release mode using QT MSVC 2015

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 741 Views 2 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.
  • AmrCoderA Offline
    AmrCoderA Offline
    AmrCoder
    wrote on last edited by
    #1

    I am creating an application that uses QWebEngine when I release my application I got a strange problem I have ever seen!! is the console open with my GUI based app! and this project.pro file

    #-------------------------------------------------
    #
    # Project created by QtCreator 2017-07-31T18:43:56
    #
    #-------------------------------------------------
    
    QT       += core gui webenginewidgets testlib
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = Clicker
    TEMPLATE = app
    
    # The following define makes your compiler emit warnings if you use
    # any feature of Qt which as been marked as deprecated (the exact warnings
    # depend on your compiler). Please consult the documentation of the
    # deprecated API in order to know how to port your code away from it.
    DEFINES += QT_DEPRECATED_WARNINGS
    
    # You can also make your code fail to compile if you use deprecated APIs.
    # In order to do so, uncomment the following line.
    # You can also select to disable deprecated APIs only up to a certain version of Qt.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    
    SOURCES += \
            main.cpp \
            mainwindow.cpp
    
    HEADERS += \
            mainwindow.h
    
    FORMS += \
            mainwindow.ui
    
    RESOURCES += \
        files.qrc
    
    win32:RC_ICONS += a.ico
    
    

    when the console open it shows some data that shown in the console in debug mode and I guess the problem is from using QWebEngine the console show me this data that come from the website loaded in QWebEngineView the data always start with JS: like this

    js: Phaser.Cache.isSoundDecoded: Key "dealer_12" not found in Cache.
    [5684:3840:0731/214213.208:INFO:CONSOLE(27)] "Phaser.Cache.isSoundDecoded: Key "loose" not found in Cache.", source: example/libs.js (27)
    

    this is some of the data appears in the console so the question is how can I make this console not appear when I start my application? I don't know what makes this problem and don't know what should I search for?

    A 1 Reply Last reply
    0
    • AmrCoderA AmrCoder

      I am creating an application that uses QWebEngine when I release my application I got a strange problem I have ever seen!! is the console open with my GUI based app! and this project.pro file

      #-------------------------------------------------
      #
      # Project created by QtCreator 2017-07-31T18:43:56
      #
      #-------------------------------------------------
      
      QT       += core gui webenginewidgets testlib
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      TARGET = Clicker
      TEMPLATE = app
      
      # The following define makes your compiler emit warnings if you use
      # any feature of Qt which as been marked as deprecated (the exact warnings
      # depend on your compiler). Please consult the documentation of the
      # deprecated API in order to know how to port your code away from it.
      DEFINES += QT_DEPRECATED_WARNINGS
      
      # You can also make your code fail to compile if you use deprecated APIs.
      # In order to do so, uncomment the following line.
      # You can also select to disable deprecated APIs only up to a certain version of Qt.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      
      SOURCES += \
              main.cpp \
              mainwindow.cpp
      
      HEADERS += \
              mainwindow.h
      
      FORMS += \
              mainwindow.ui
      
      RESOURCES += \
          files.qrc
      
      win32:RC_ICONS += a.ico
      
      

      when the console open it shows some data that shown in the console in debug mode and I guess the problem is from using QWebEngine the console show me this data that come from the website loaded in QWebEngineView the data always start with JS: like this

      js: Phaser.Cache.isSoundDecoded: Key "dealer_12" not found in Cache.
      [5684:3840:0731/214213.208:INFO:CONSOLE(27)] "Phaser.Cache.isSoundDecoded: Key "loose" not found in Cache.", source: example/libs.js (27)
      

      this is some of the data appears in the console so the question is how can I make this console not appear when I start my application? I don't know what makes this problem and don't know what should I search for?

      A Offline
      A Offline
      ambershark
      wrote on last edited by ambershark
      #2

      @AmrCoder It's a javascript info message (warning/error?). It is coming from the web page you are loading with QWebEngine. You can fix the js code if it's something you own, or you can just ignore it if it is something someone else made.

      Edit: I read further and noticed it was pulling up a console that you don't want. I don't know how to suppress that but I will check the docs real quick and see if anything jumps out.

      Edit again: Here ya go this should help you in preventing the console popping up. http://doc.qt.io/qt-5/qtwebengine-debugging.html#console-logging. It looks pretty easy to deal with. You just catch the messages and deal with them how you like rather than letting the console come up.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      1

      • Login

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