Unsolved "QtQuick" plugin "qtquick2plugin" not found in MacOS C++ app using Qt5.15.2
After deployment of my application using QML the app runs, but I don't get a user interface. In the message section in Qt Creator I get this message:
qrc:/qml/main.qml:1:1: module "QtQuick" plugin "qtquick2plugin" not found
Hi and welcome to devnet,
How did you deploy your application ?
@SGaist /Users/franz/Qt-pro/5.15.2/clang_64/bin/macdeployqt "path to my app" -qmldir="path to my qml folder"
What is the path to your qml files ?
@SGaist the path to my app:
path to the qml:
Using the standard package provided by the online installer ?
If not, did you check that bug report ?
@SGaist yes, standard package. It all worked when I used 5.7
@franzhelmut I did this exactly the same way on 2 separate computers, one being a new Mac mini with M1 chip running Big Sur, and a MacPro running Mojave, same results.
Did you try to run macdeployqt with more verbosity to see if it's complaining about something related to that module ?
@SGaist yes, I did. macdeployqt doesn't think Quick2 is necessary, there is no reference to it at all. How can I add it "by hand"? I am now trying the same thing on Windows 10 and see what happens there.
How are you doing your imports ?
Can you provide a minimal compilable example that shows this behaviour ?
@SGaist no way, this is a really complicated application
@franzhelmut my main.qml has these imports:
import QtQuick 2.7
import QtQuick.Window 2.2
import QtQml.Models 2.1
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.XmlListModel 2.0
import Qt.labs.settings 1.0
in my working 2.7 version I have a quick folder inside of a Plugins folder with delis for each of these, in my 2.15 Plugins I have no quick folder.
I now collected the equivalent dylibs from 5.15.2 and put them in a quick folder inside of Plugins. Now I don't get any complaints about missing components, but I get this:
QQmlApplicationEngine failed to load component
qrc:/qml/main.qml:1080:5: Type FrontPage unavailable
FrontPage is a major QML component in my main.qml
On Windows 10 I do get all the components from the deployment, but I also don't get any user interface when I run the application.
So I am guessing something changed in a fundamental way with QML from version 5.7 to 5.15
what I also wanted to mention is that in Debug mode everything works as it should, that would indicate to me that the code is correct
IIRC, at least on Windows you can pass additional modules to deploy. Did you try that ?
@SGaist No, but the Mac version is my main problem, one big issue I have there is now fixed in 5.15, it has to do with color.
Do you have the same issue with a small default application ?
If not, then, add new modules until you find the one that makes things fall appart, that will help pinpoint issue.
@SGaist My Windows application runs just fine now, doesn't that mean that this is a Qt deploy problem?
Where do we go from here?
What did you do on Windows to make it work ?
@SGaist nothing at all, I remember my window positions in the settings and restore them. Unfortunately I had removed the monitor that my window had been on and didn't properly handle that in the code. So removing my Regedit entries brought everything back.