[Interest] QML/C++ interaction in Qt6

Jérôme Godbout godboutj at amotus.ca
Mon Sep 14 17:29:48 CEST 2020


Oh,... now that's a deal breaker... I guess I will have to stick with the old method for a while, having 1 plugins per modules to be expose will need some major refactor over here. I have subrepos who have a single .pri and might expose a few modules and some modules are partials between subrepos. I gather my .pri to build for some targets and platforms specific subrepos might add stuff to it. 

The idea seem good, but the result doesn't scale too well and ain't flexible. Is the old way will still work into Qt 6 then?

-----Original Message-----
From: Giuseppe D'Angelo <giuseppe.dangelo at kdab.com> 
Sent: September 14, 2020 11:22 AM
To: Jérôme Godbout <godboutj at amotus.ca>
Subject: Re: [Interest] QML/C++ interaction in Qt6

On 14/09/2020 17:19, Jérôme Godbout wrote:
> Yeah I got that part, the part I do not get is how can you have multiple QML_IMPORT_NAME and multiple files in each? how do you tell into which modules goes which classe? Is it the declaration order into the .pro/.pri?
> 
> I for one, also keep track of every singleton instance instanciate from Qml for C++ type, so my C++ can request the same singleton if ever needed (I18n, Application wide settings, style and themes...). I did make my own template class wher I can register the module more easily, nt havign to retype the module name and version each time. Also have the getter for those singleton instance per Engine*.

As far as I know, you split the project in multiple .pro files (e.g. by 
building a bunch of static libs or QML plugins). Each .pro will have its 
own import.

HTH,

-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



More information about the Interest mailing list