Is it possible to use any QML Parser Tool? - qt

Is it possible to use any QML Parser Tool in order to see how we should parse our Qml Application which has also use C++ libraries thanks to qmlRegisterType ???

Related

Are .ui files from qt compatible with both python and c++?

I have been working with QT UIs and python for a while now. I have been wondering, if the .ui files that are generated when using the qt-creator or qt-designer are compatible with both python and c++? I mean it is just some simple xml syntax right?
Yes, both are simple xmls. The differences could be generated in the tools that convert that xml to C++ or Python (uic for C++ and currently for PySide2, pyuic for PyQt5) since that code interprets the attributes.
So the answer, that I was looking for: Yes .ui files are compatible. They are simple xml syntax files and simply contain the structure of your designed user interface.
Depending on your programming lagnuage, the xml file is parsed, so that you can use it.

How can you access any android classes using JNI in Qt?

I'm a newbie on Qt and JNI so please edit or correct me if anything I am saying is off.
How can you access the classes in Android in the C++ code in Qt Creator? It is seemingly not possible to access classes not directly supported by QtAndroidExtras import .
e.g. TextView, BlueToothReceiver, and the countless many useful classes
Here is a good example:
http://doc.qt.io/qt-5/qtandroidextras-notification-example.html
It is possible to call any class from C++ per jni.

Embed QtDesigner

Is it possible to embed QtDesigner into a PyQt application. I did some searching but can't really find any examples. Found lots about using the interface API but not really how to get the interface in the first place.
You will need to make 3 steps:
Get QtDesigner & QtCreator source
Create bindings from QtDesigner C++ code to python using SIP or Shiboken
Look at QtCreator source of how to embed QtDesigner into your application
I don't think its possible to do it without the source code. I doubt Qt will hand it out either. https://github.com/qt-creator/qt-creator is the source for QtCreator, but I could not find anything similar for QtDesigner.

Create a Qt library to be used in a non-Qt application

I created a Qt static library following the instruction here:
http://qt-project.org/wiki/How_to_create_a_library_with_Qt_and_use_it_in_an_application
Then I tried to link the library with my own (non-Qt) application, and GCC complained about undefined references. Examining the library content using Linux nm utilty I found the function I intend to call has cryptic letters added before and after it.
Reading the instruction from the instruction link more closely, it suggests that I need to use use an import define so the right Qt macro can be called to import the function (which I assume renames the function to match the naming scheme in the library). But I don't really want to introduce Qt dependency in my main application.
What I really want to do is to build a UI frontend library with Qt, and my main application will simply link to it without having any Qt dependency. Is this possible? Or am I using Qt in an unintended manner?
Thanks.
It sounds like you're running into C++ namespace mangling. Try adding an 'extern "C" {}' block around your libraries export.
The main point of the QLibrary::resolve function is to provide an abstraction layer so you don't have to worry about the win32 command or the linux command for resolving a symbol. It shouldn't be necessary to use a library created with Qt.

Undefine symbol from Qt library

I create a static library using Qt library. But when I use this created static library and link to my application, then the problem is it will give me undefine symbol of QImage.
Please advise.
Many thanks.
some error message:
undefined reference to `QImage::~QImage()'
You need to link the application with your library AND Qt libraries.
You library is not linked to Qt.
When you create a a static library, it doesn't pull in everything from QT. It pulls in only the object files to satisfy the undefined symbols.
So you still need to link with QT libraries.

Resources