Qt3DWindow open a terminal window
-
I copied the simple-cpp example code for the torus into a QtCreator console application. When I start the application the torus show, but there is also a terminal window opened with the message; "QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
Press <RETURN> to close this window..."
That window did not appear when the example was run. How do I prevent it from opening?By the way, thanks to those that helped me track down the Kit problem.
-
@ofmrew Please look in your projects .pro file.
Do you have a
CONFIG += console
line? (There may be more words after += but console is relevant). Try removing the word console, if it's the only word remove the whole line. Save the file, wait 5 seconds, run qmake, and build the project again. -
@aha_1980 Same problem. This is my .pro file:
QT -= gui
CONFIG += c++11
CONFIG -= app_bundleThe following define makes your compiler emit warnings if you use
any feature of Qt which as been marked deprecated (the exact warnings
depend on your compiler). Please consult the documentation of the
deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
You can also make your code fail to compile if you use deprecated APIs.
In order to do so, uncomment the following line.
You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
QT += 3dcore 3drender 3dinput 3dextras 3dlogic
SOURCES += main.cpp