Important: Please read the Qt Code of Conduct -

C++ application with QML UI

  • Dear all,

    I have a new project where I need to make a OPC UA client. This OPC UA client needs to connect with a local OPC UA server.
    In the past I always used a widget application to make my app. Now they asked me to create a "modern" UI.

    I think this is a good time to program for the first time a QML ui.
    The data processing I would like to make in c++ and just send the data which needs to be visualized to the QML ui.

    I already started with some basics. Now I have no idea what is the best to continue.


    1. I created a widget application.
    2. In this widget application I created a QQuickwidget (I don't think this is the way to do it!)
    3. I created they ui with QML code
    4. I load the ui into the QQuickwidget.

    Is this the correct way to do so?
    If not, could you please give me a hand?

    second, how to connect the buttons and textboxes I have created in the QML ui with the data I have processed in C++?

    I already searched the internet, but can't get my head arround it.

    Thanks in advance,
    Kind regards

  • Lifetime Qt Champion

    @TMJJ001 said in C++ application with QML UI:

    I created a widget application.

    Create a QML application instead. You will write your UI with QML/QtQuick and logic in C++.

Log in to reply