Can I use QtQuick 2 in Qt 4.8 widget?



  • Is it possible to use QtQuick 2 components in a Qt 4.8 widget? I have been developing QtQuick 2 GUIs in Qt 5.6 using some stylized components. I was recently asked to make some QML interfaces for another program, but it is using Qt 4.8. In addition, it only has interfaces to QWidgets. I figured out how to display QtQuick 1.1 in a 4.8 QWidget, but I would like to use my new stylized components. Any way to do this? I unfortunately can't upgrade to Qt 5.6 or higher in this project.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Do you mean QtQuick Controls 2 ?



  • Yes QtQuick 2.0, QtQuick.Controls 1.4, and maybe some others. Since QML is javascript I was hoping to only have to point QML_IMPORT_PATH to the proper QML directory in the Qt 5.6 install. I can't seem to do it correctly. I'm on Ubuntu 14.04. The only reason I'm having to do this is that I'm using ROS Indigo with Rviz and it was compiled with Qt 4.8 which only seems to have QtQuick 1.1. I'm making a plugin for Rviz and would like to use my better QML stylized controls.


  • Lifetime Qt Champion

    QtQuick is not only QML, it's also backed by C++.

    You also can't mix and match Qt versions like that.



  • Thanks, I was afraid that was the answer, but I thought I would ask.


Log in to reply
 

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