简体   繁体   English

如何在Qt中永久禁用QML调试器?

[英]How to permanently disable QML debugger in Qt?

Whenever I make a Qt project, the qmake command includes this parameter: 每当我创建Qt项目时,qmake命令都会包含以下参数:

"CONFIG+=qml_debug"

I never use qml and dont want to manually click three times and ignore the warning every time I generate a new project. 我从不使用qml,也不想手动单击3次,每次生成新项目时都忽略警告。

You can download Microsoft Visual Studio 2017 Community Edition, it's free to use. 您可以免费下载Microsoft Visual Studio 2017社区版。 And it is not only a great IDE but also it has got Qt support. 它不仅是一个出色的IDE,而且还提供了Qt支持。 By downloading Qt plug in for Microsoft Visuals Studio you can create Qt projects and build and debug them... 通过下载用于Microsoft Visuals Studio的Qt插件,您可以创建Qt项目并生成和调试它们。

Everything that you do with Qt Creator and it has got no such problem as yours. 您使用Qt Creator所做的一切,都没有像您这样的问题。

Also if you want to stay with Qt creator, check Projects -> Build & Run -> Run Settings. 另外,如果您希望与Qt Creator一起使用,请选中“项目”->“构建和运行”->“运行设置”。 There is Enable QML setting which mine is disabled. 有启用QML设置,哪个是我的被禁用。 Maybe you can disable it from there. 也许您可以从那里禁用它。

在此处输入图片说明

If not I advice you to check Tools -> Options -> Build & Run and Tools -> Options -> Debuggers. 如果不是,我建议您检查“工具”->“选项”->“构建和运行”以及“工具”->“选项”->“调试器”。 If it can be solved within Qt Creator it must be solved from these places. 如果可以在Qt Creator中解决,则必须从这些地方解决。

It happened to me in a project. 它发生在我的一个项目中。 I just added this to the .pro file : 我刚刚将此添加到.pro文件中:

CONFIG -= qml_debug

It seems to work. 它似乎有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM