How to transfer data between tabs
MP10 last edited by
Firstly, I am new to Qt tools. I am using Qt Creator for developing an desktop application. I am developing UI for this app using QML. I am using Qt 5.
In the UI for the app I have certain parameters being displayed with real-time values. I am able to receive data on UI from external system and I am able to plot it in real time, as well. But currently I am displaying everything in single window. I am trying to use tabs for better representation. I want to display the numerical values in Tab1 and graph for the selected value in Tab2. But I am unable to implement this, so far. Please let me know if there is any possible solution to implement this type of UI.
I tried using TabView but it just plots the value fields and the plotting window in separate tabs. It does not show graph for the continuously varying values in Tab1 on selecting any of the values.
Please let me know if anyone knows how to implement this. Any help is appreciated!
Hi @MP10 and Welcome,
Have a look at the following:
This is similar to Qt C++ signals and slots mechanism and allows transfer of data.
This explains how variables/properties can be defined in QML and binded to other properties on same or other pages so that when one changes the other is updated too. In your case you can try binding the numerical values on Tab1 with similar properties on Tab2. Then you can use the corresponding event handler for these properties to update the graph. The event handlers are triggered when a property's value changes.