Component with path `*.qml` could not be created - qt

I'm using Qt Design Studio and I'm receiving an error:
Component with path *.qml could not be created
The error is thrown for custom QML types in their own QML files.
However, There is no such issue when working with Qt Creator rather than Qt Design Studio.
I have researched and looks like people have run into similar issues in 2016.
Is there any solution?

Related

Runnable Jar from a JavaFX 8 project, JavaFX compenents are missing

i created a Javafx project using JDK 8 and when i tried to export it to a runnable .jar file, i got surprised that it doesn't run using CMD, and gives the following error :
"Javafx compenents are missing"
while it works perfectly during the compiling time(using the IDE) when i accessed the .jar files, i found it has just .class files (that i made), and the needed library files that haven't been exported (i made sure to select the "extract need library files extract required libraries into generated jar" option in Eclipse), is there a reason behind of this? and a way to solve it? thanks in advance
Ps: i tried this using Eclipse and Intellij IDE
I just wanna mention once again that I'm using JDK 8 where it has JavaFX library inside of it.
Did you try this?
There are detailed instructions on how to configure your IDE to run JavaFX with newer OpenJDKs (which do not come with JFX components in it).
It also explains how to create a new JavaFX Maven project from archetype, with all the necessary plugins to easily build your application while including the minimal Java components for it (using jlink).
This will ensure that anybody using your application will have those components.

How to add a qt5 application in a yocto recipe?

I would like to know where I'm missing something in my project. In fact, I'm successfully embedding all the files I need in my recipe and all the packages I need (I think). Qt5 is installed in my recipe (I have the meta-qt5 layer) and my app is launching but immediately crashing with this error :
QQmlCOmponent : Component is not ready
qml : actionView test for Vid? is null
QQmlComponent : Component is not ready
qml : action imageTest for Image is null
qt.qpa.xcb : xcb_shm_create_segment() failed for size 1228800
Segmentation fault
I first thought that these error were here because the binary could not find my qml files. I've made some changes to my recipe so that every needed files are embedded and nothing has changed. Then I thought that I was missing some QtQuick packages like the qml plugin one. I also added it, but the error is still the same. My only last thought is that I'm missing another package or that on the yocto side, reading qrc files is not done in the same way then on the pc side ( my app is working perfectly in Qt Creator using Qt 5.12.3).
PS : I also tested to use the binary of my application made by qt creator in the directory "sent" in the yocto image and it works like in Qt Creator. That is make me thinking that the tree of files deployed in yocto is good (it is the same as in my qt project so that make senses but I'm trying everything I can to debug this problem)
If you have any idea on where these errors could come from, I would be glad to hear it.

How to setup QT Creator to use Autodesk FBX SDK as a library?

The Qt documentation for QMesh at the following link, https://doc.qt.io/qt-5.11/qt3drender-qmesh.html, shows that QMesh supports FBX when using the Autodesk FBX SDK. It provides no resource about how to go about setting this up, so I searched and found 1 resource on setting up the FBX SDK with Qt Creator at the following link:
https://forums.autodesk.com/t5/fbx-forum/including-sdk-to-qt-creator/td-p/8184654
I tried the above solution, but when I try to load the QMesh I still get a Debug warning that: Qt3D.Renderer.Jobs: unsupported format encountered (fbx)
This is my code, which works for .obj files
Qt3DRender::QMesh* mesh = new Qt3DRender::QMesh();
mesh->setSource(QUrl::fromLocalFile(filepath));
I'm not sure if the "fbx geometry loader plugin is built and found" which according the Qt documentation is needed. I put the proper reference to the library in my .pro, but as far as I can tell setSource still doesn't know to utilize FBX files.

Qt error with reMarkable tablet app

I have a reMarkable tablet , which I mostly love except for the lack of linux support (surprising given it is a linux-based OS). However, I've managed to find a version of a linux application that is now unofficial. This github is actually a Qt docker app, but if you look in the code for the 'Dockerfile' you can find where to download the app, which is apparently still on the server even though there's not a link from the main web page. Anyway, I downloaded it and got it mostly working, figuring out a few dependencies based on same Dockerfile code. But, I can't seem to get file dialogs to work, which is the main reason for using the app.
The error I get is:
ERROR: No native FileDialog implementation available.
Qt Labs Platform requires Qt Widgets on this setup.
Add 'QT += widgets' to .pro and create QApplication in main().
I'm not a Qt developer, so I'm lost. I'd love to get this to work. Thanks.
In the .pro file of you project you should add this line QT += widgets
or just add widgets to the line with QT += ...
Qt can use native file dialogs on some platforms, and will fall back to its own implementation if none is available. But that requires that the application is built including the QtWidgets module, and using a QApplication.
If you don't have the source code of the app and a possiblity to rebuild it, there's no chance to fix this from a binary

How to import the QML-Book examples into QT Creator 3.4.0?

How can I import these code examples into QT Creator 3.4.0 ? I tried the available import options but they don't work.
I tried to create an empty QML project and add the rectangle.qml file to it. When I tried to run it, nothing showed up.
The book examples contain files .qmlproject - which seems to be a project descriptor. I wonder if it is somehow possible to import these .qmlproject files into QT Creator, click and run the examples.
I think this link might help in finding the solution : https://forum.qt.io/topic/27525/what-is-qmlproject-file/3 .
Usually I'd say that you should go to File > Open File or Project... and select the .qmlproject and you're done, but support for this type of project file was disabled by default. If you try to do this now (I believe the change is in Creator 3.4), you'll just get an error message about Creator not supporting the mime type of the file, or something. Unfortunately, this is not a very useful error message for a beginner, and it won't tell you how to fix the problem.
If you want to use .qmlproject files in newer versions of Creator, you have to navigate to Help > About Plugins... and enable the QmlProjectManager plugin (it's under the Qt Quick section) by checking the box.
So this is how you should normally open project files in Qt Creator. As for the window not showing up, that's also commonly encountered and can be fixed by making the root item in your scene a Window:
Unlike QQuickView, QQmlApplicationEngine does not automatically create a root window. If you are using visual items from Qt Quick, you will need to place them inside of a Window.
Qt Creator's new project wizard handles this for you when you create a new Qt Quick project, as you saw when you got the "Hello World" window to open in your video. It was when you loaded concepts/rectangle.qml which had a Rectangle as its root item, that it stopped showing up. That QML file was likely used in a project where a QQuickView was displaying it.

Resources