PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, April 28, 2022

[FIXED] How to disable certain console warnings in Qt

 April 28, 2022     qt, warnings     No comments   

Issue

On some paint events, Qt outputs several warnings in the console: "QPainter::begin: Painter already active"

I would like to disable this particular warning because it clutters the Output window and I'm not planning to fix it. How can I do that?


Solution

The only way to do it is to remove it from the Qt sources and recompile them. But it would be much easier and reliable to just fix the cause.

P. S. Actually, as noted in the other answer, it is possible to install an msg handler and filter out that particular message by calling strcmp(), but that's both ugly and not very reliable - if the message is altered in any future version, it will start appearing again.



Answered By - Sergei Tachenov
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing