Results 1 to 6 of 6

Thread: QWebEngine app deploying with console log.

  1. #1
    Join Date
    Mar 2019
    Posts
    4
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QWebEngine app deploying with console log.

    I moved from Qt 5.12.4 to Qt 5.13. I am working on QWebEngine based app. Formerly, I have deployed my app with console log window, so whenever app started console logging was also starting. But in 5.13 this does not happen. How can I deploy my app with console logging feature?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QWebEngine app deploying with console log.

    Qt can be built with support for system logging facilities, such as Unix syslog, Linux journald or Windows debug logger.

    Maybe the build option chosen for your two versions were different.

    You should be able to force console logging using

    Qt Code:
    1. QT_LOGGING_TO_CONSOLE=1
    To copy to clipboard, switch view to plain text mode 

    in the program's environment.

    Cheers,
    _

  3. #3
    Join Date
    Mar 2019
    Posts
    4
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QWebEngine app deploying with console log.

    How I will set this env. variable?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QWebEngine app deploying with console log.

    Inside the application code for example with [URL="https://doc.qt.io/qt-5/qtglobal.html#qputenv"]qputenv/URL].

    In the actual program environment depends on how you launch it.

    In QtCreator and other IDEs there is usually a runtime setting for that, when launched from a shell it can be set there, when launched from a desktop link it might be possible to set it there

    Cheers,
    _

  5. #5
    Join Date
    Mar 2019
    Posts
    4
    Thanks
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QWebEngine app deploying with console log.

    Unfortunately, it does not work. Program was logging like that in 5.12.4 release:
    console.jpg.
    However when I start the program from gitbash it writes logs in the console, but if I start it from cmd or power shell logs do not appear.

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QWebEngine app deploying with console log.

    Does your .pro file have

    Qt Code:
    1. CONFIG += console
    To copy to clipboard, switch view to plain text mode 

    Windows is unfortunately very weird when it comes to programs writing to stdout or stderr.

    Cheers,
    _

  7. The following user says thank you to anda_skoa for this useful post:

    sharofiddin (28th August 2019)

Similar Threads

  1. Using QWebEngine to login to a page.
    By ayanda83 in forum Qt Programming
    Replies: 7
    Last Post: 29th November 2016, 13:17
  2. Using cache with QNetworkAccessManager in QWebEngine
    By d1psy in forum Qt Programming
    Replies: 5
    Last Post: 18th August 2016, 14:20
  3. Replies: 2
    Last Post: 27th June 2016, 23:58
  4. Get Html element value with QWebEngine
    By danalex07 in forum Newbie
    Replies: 10
    Last Post: 5th February 2016, 04:18
  5. QWebEngine MP4 5.5
    By RolandHughes in forum Qt Programming
    Replies: 0
    Last Post: 15th December 2015, 00:04

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.