是否可以在没有 QApplication 的情况下使用 QML 和 QtQuick?

Is it possible to use QML and QtQuick without QApplication?

我正在寻找一种使用 Qt 编写音频插件的方法。音频插件通常是动态库,而不是应用程序(http://teragonaudio.com/article/How-to-make-VST-plugins-in-Visual-Studio.html). While searching, I found on the audio forum contains the post QT etc for vst UI:

QtQuick/QML is perfect for any GUI development, including plugins. The only downside is that the payload is big (size of deployment). But that's really just the installation size and none of it affects performance. There are numerous ways to inject QtQuick scene graph to a window and not all of them are tied to or limited by the QApplication fake singleton. Gluing generic C++/Boost to Qml is made simple and thread-safe and Qt Quick scene graph itself runs mostly on GPU.

It's really just best to avoid all the QApplication and old Qt graphics framework techniques. They were good for maybe KDE and embedded systems (dentists chairs) ten years a go. QML made all that obsolete. For KDE also by the way.

这些说法正确吗?
在 c++ 项目中如何在没有 QApplication 的情况下使用 Qml 和 Qt Quck?我可以在这样的项目中使用 qtbase 模块吗?

我通读了您 link 中的所有帖子,我认为作者的措辞非常宽松。当他说:

It's really just best to avoid all the QApplication and old Qt graphics framework techniques.

他似乎只是指避免使用 Qt Widgets。 docs say "QApplication specializes QGuiApplication with some functionality needed for QWidget-based applications." In another post, he points to a QQuickRenderControl example, which he doesn't provide a link to, but I assume is this。该示例使用 QML 和 QGuiApplication,而不是 QApplication。

Qt 有为 Qt-based 应用程序创建插件的示例。如果您想使用 Qt 为 non-Qt 应用程序创建插件,那么它可能会工作,但要准备好必须随插件一起提供 Qt 库,并且您可能仍需要 QGuiApplication。我真的没有办法解决这个问题。