"QtQuick" plugin "qtquick2plugin" not found in MacOS C++ app using Qt5.15.2
-
wrote on 15 Feb 2021, 14:24 last edited by
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 ?
-
wrote on 16 Feb 2021, 06:14 last edited by
@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 ?
-
wrote on 16 Feb 2021, 20:53 last edited by
@SGaist the path to my app:
/Users/franz/Source/myApp/myProject/Output/my.apppath to the qml:
/Users/franz/Source/bICC-myApp/myProject/Resources/qml -
Using the standard package provided by the online installer ?
If not, did you check that bug report ?
-
Using the standard package provided by the online installer ?
If not, did you check that bug report ?
wrote on 16 Feb 2021, 21:09 last edited by@SGaist yes, standard package. It all worked when I used 5.7
-
@SGaist yes, standard package. It all worked when I used 5.7
wrote on 16 Feb 2021, 21:20 last edited by@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 ?
-
Did you try to run macdeployqt with more verbosity to see if it's complaining about something related to that module ?
wrote on 17 Feb 2021, 18:55 last edited by@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 ? -
How are you doing your imports ?
Can you provide a minimal compilable example that shows this behaviour ?wrote on 17 Feb 2021, 19:37 last edited by@SGaist no way, this is a really complicated application
-
@SGaist no way, this is a really complicated application
wrote on 18 Feb 2021, 16:49 last edited by@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.0in 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 unavailableFrontPage 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 -
wrote on 18 Feb 2021, 17:05 last edited by
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 ?
-
wrote on 18 Feb 2021, 20:45 last edited by
@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.
-
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.
wrote on 21 Feb 2021, 13:02 last edited by@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 ?
-
wrote on 22 Feb 2021, 18:20 last edited by
@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.
1/22