10
votes

I'm trying to run a very simple program that just closes the window when clicking the `exit button, but get the following output provided that the application window that contains the button does not show up:

Starting C:\Users\Ola\Desktop\signal_slot1-build-desktop-Qt_4_8_1_for_Desktop_-_MSVC2008__Qt_SDK__Debug\debug\signal_slot1.exe...
Qml debugging is enabled. Only use this in a safe environment!

What should I do in this case?

3

3 Answers

10
votes

You have enabled QML debugging (actually it's on by default), this opens a port to the Javascript interpreter that is running the QML so you can get debug output from it. Obviously this creates a security hole, so it should be turned off when not being used in safe place (it's turned off automatically when you release compile). This warning is to remind you of that.

If you are not using QML, turn it off anyway. You can turn it off in the project's options page, where the build settings are (it's a check box in the qmake area).

1
votes

Assuming you use Qt Creator:

If you select the Release-Build type the QML debugging will be disabled. To do this, select the build type on the bottom left corner above the "run" button and choose "release".


Manually, there is an option passed to qmake (either in the .pro file or via command line arguments) named

CONFIG+=qml_debug

which enables qml debugging. If you omit that, it should be disabled.

0
votes

You can change it to release mode if you want to and that would solve the problem but I recommend you to change between MSVC and MinGW and check which one is going to work. Project->Build and Run-> and choose what you need.