How to import the new `QtQuickTemplates2` and `QtQuickShapes` modules in 5.12?



  • I find that there are some new QtQuick modules availiable in header(c++ aslide), and try to import them, the header files can not be found:

    #include <QtQuickTemplates2/private/qquickbutton_p.h>
    #include <QtQuickShapes/private/qquickshape_p.h>
    

    Qt 5.12rc2 with VS2017 15.9.3


  • Moderators

    Private headers are private for a reason!

    If you do want to include them, however, you need to add relevant private modules to QT variable in qmake:

    QT += qml qml-private quick quick-private quickcontrols2 quickcontrols2-private
    

    I'm not sure if that'll work, but it might.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.