OverviewFelgo 2 Support (Qt 5) › Weird behaviour of qInstallMessageHandler()

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #8557


    Merry Christmas everyone,

    I want to redirect all log output of my application (which is console.log()) to my UDP logger. Therefore I created a function by using this as a reference.

    In my test application (without VPlay, plain Qt 5.3) it works just as expected. But if I call qInstallMessageHandler(myFunc) in my game I either:

    – get no log at all (just the default console log)

    – only the first two logs are outputted, the rest again in console

    – the first logs are to console and the following works as expected (I can live with it but…)


    Here’s the main.cpp of my game, you can see multiple calls of qInstallMessageHandler(). I inserted multiple calls to get the result of scenario 3. Less calls either result in scenario 1, 2 or something else. There must be something completely wrong. It’s either a Qt but, a VPlay bug or I’m loosing my mind, because I have nothing better to do on Christmas. I hope someone can take a look at it.




    Felgo Team

    Hi Joshua,

    it’s not  bug you are experiencing, but in the vplay.initialize() call the messageHandler is overwritten. So to set your own message handler, set it after the vplay.initialize() call.

    Cheers & Merry Christmas 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support