Julien
Julien

Reputation: 890

cmake equivalent for CONFIG += qmltypes

This link explains how to register qml component with 5.15. I need to add

CONFIG += qmltypes 

to my .pro file but I'm using cmake and did not find a way to do it.

What could it be?

Upvotes: 2

Views: 516

Answers (1)

talamaki
talamaki

Reputation: 5482

If you take a look into the comments in the blog post you linked you can see people asking about how to use new QML type registration approach with CMake and the author responds:

CMake projects will be supported with Qt6.

I suppose you need to go with the old way of registration with CMake, e.g.

qmlRegisterType<Person>("People", 1,0, "Person");

Upvotes: 2

Related Questions