How to Suppress Warnings in Qt Creator

disable a specific warning in QtCreator

To disable specific warning annotations in the Qt IDE:

Go to Tools -> Options -> C++ -> Code Model

Click Manage next to Diagnostic Configuration

Select Clang-only checks for almost everything[built-in]

Click Copy on the upper right corner

Go to the copied version of the Diagnostics Configuration and append -Wno-inconsistent-missing-destructor-override in the text field under the Clang tab.

You can read more about configuring the Clang Code Model here.

Is there an option to hide clang inline warnings in QtCreator?

Options > Text Editor > Display > Annotation next to line.

It helps me in Qt Creator 4.4.1.

Getting rid of errors and warnings in a python file in Qt Creator

As far as I know, Qt Creator does not support globally disabling warnings yet. However, you can try ignoring the Flake8 linter on specific files.

  • Ignoring the entire file

    You can add this line to ignore all warnings in the file.

    # flake8: noqa
  • Ignoring the specific lines

    Or you can add this comment at the end of every line that you want to ignore errors on.

    # noqa

References

  • Qt Forum: Disable specific Python warnings
  • Ignoring Errors with Flake8

disable warning in c++

Repeating the previous answer "The answer is in the warning message itself."

"To disable this warning use -Wno-deprecated."

You can specify the compiler flag in the Qt project file (.pro) adding this line:

QMAKE_CXXFLAGS += -Wno-deprecated

P.S. It will be better to fix the code itself

How can I make QT Creator stop logging warning exceptions?

For Windows: Go to Tools -> Options -> CDB -> Add Exceptions to Issues View -> uncheck "First chance exceptions".

Contrary to what I expected it does two things: remove the exceptions from the issues view, and stop them from appearing in the application output tab.

Sample Image

Qt Creator - How to get rid of line too long warning in python scripts

I found at least how to hide these annotations (for Mac Os users): First method is to go with the mouse on the top-left corner of the screen and to sequentially click Qt Creator->Preferences. Immediately the Preferences Dialog Window will appear inside the Qt Creator working window. There, have to go to Text Editor in the left panel and in the right panel associated with Text Editor, in the horizontal tabs have to click on Display tab. Scroll down and uncheck Line annotations. The second and the third methods imply to place the mouse over one particular annotation (second method) or over one of the small yellow triangles which are shown in the left column of the "lines numbers column" (third method) and in both cases after one or two seconds will appear a floater and inside that floater with blue letters will be the "Annotation settings" message. Clicking on that message will open the same Preferences Window like in first case. And there will be repeated the procedure described in the first case.



Related Topics



Leave a reply



Submit