Тёмный

How to integrate C++ and QML 

Qt Group
Подписаться 50 тыс.
Просмотров 10 тыс.
50% 1

In this video we explore the basics of integrating QML and C++. We start with a pre-written QML application and will focus on how to write a C++ class which can be exposed to QML.
Qt website: www.qt.io/
Support center: account.qt.io/s/support-center
QML and C++ integration documentation: doc.qt.io/qt-6/qtqml-cppinteg...
This example was written using the following...
Qt 6.5.2 MinGw 64 Bit
Qt Creator 11.0.1 (Enterprise)

Наука

Опубликовано:

 

14 авг 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@Roberto-kd3jg
@Roberto-kd3jg 9 месяцев назад
Show! Este vídeo está me ajundo muito! Continue postando mais vídeos incríveis assim... Thank you!
@theintjengineer
@theintjengineer 11 месяцев назад
What if my "C++ Backend" is a C++20 Module, created as an Extension Plugin? I couldn't just add my *.cppm* files as the values for SOURCE and that's it, right?!, since the C++ Module/Plugin itself has its own "qt_add_module..." characteristics (you can see how it is defined by following the Qt Creator Wizard for a Qt Quick 2 Extension Plugin). I mean, my Module doesn't know of a Main.qml file "yet", as in your case, where you directly pass the QML File to the QML FILES Variable. It's when I create the QML Quick App that I'll want to import my Library of Modules, so I can use them inside the QML Files. They're all inside a folder called import. I need to make sure they're are visible to the Project and that I can statically link them. So, yeah, I'm sort of lost bringing in my C++ Modules (Data Models/Sources, Controllers) to use with a QML View 😅 This is the only problem we're having - we would like to use QML for our GUIs/Views, but have everything as C++20 Modules (we ain't going back to raw headers, #includes, etc. 😂) Thanks in advance.
@marektengler6033
@marektengler6033 6 месяцев назад
I have followed you steps, but when i added "import " it seems that qml file dont see Backend at all, i have red underline and yellow message saying "QML module contains C++ plugins, currently reading type information...". Anybody have idea what does it mean?
@MikeTrahearn
@MikeTrahearn 11 месяцев назад
Maybe raise a support ticket or post on the forum with a cut down example.
@MikeTrahearn
@MikeTrahearn 11 месяцев назад
QtQml is not always the best include for your type registration macros - depends on whether you want to link to QtQml or not. If you've not had that argument with your boss yet - you will do, so be prepared 😔
@paradox_695
@paradox_695 5 месяцев назад
the C++ class used in this demo is named "Backend". I got lost in 6:53 when the Button.onclicked() uses an unknown class named "myBackend"...???
@Ryochan7
@Ryochan7 3 месяца назад
Go back to 5:25. Backend is the type. An instance of Backend is created in QML with the id myBackend. That instance can be accessed in the QML file as myBackend.
@shuxiang4716
@shuxiang4716 5 месяцев назад
bruh, import CppIntegration QML module not found, what's wrong?
@shuxiang4716
@shuxiang4716 5 месяцев назад
Im using qmake.
@and_then_I_whispered
@and_then_I_whispered 4 месяца назад
WE KNOW HOW TO CREATE A CLASS. SHOW US THE DAMN WAY TO CREATE THE PLUGIN, I'M TIRED OF THE DOCS.
Далее
Integrating C++ with QML
13:26
Просмотров 49 тыс.
Schoolboy - Часть 2
00:12
Просмотров 4,9 млн
СМОТРИМ YOUTUBE В МАЙНКРАФТЕ
00:34
Просмотров 895 тыс.
best way out of the labyrinth🌀🗝️🔝
00:17
Просмотров 935 тыс.
QML syntax and basic components
12:13
Просмотров 3,7 тыс.
WHY did this C++ code FAIL?
38:10
Просмотров 242 тыс.
Gtk vs Qt | GUI tool kits | Which is Better?
7:06
Просмотров 34 тыс.
Generics: The most intimidating TypeScript feature
18:19
Let's Recreate the Tesla UI in Qt and QML PART 1!
51:16
how Google writes gorgeous C++
7:40
Просмотров 839 тыс.
Using C++ Models in QML {tutorial}
49:49
Просмотров 138 тыс.
Проверил, как вам?
0:58
Просмотров 364 тыс.