I have 5 different popup’s that displays 5 different properties all these 5 properties need to be checked periodically from CPP in order to update if there is any change in the value of property. At present i am using 5 different timers for checking the 5 different properties on periodic basis. Is there a way to use a single timer for achieving the same in Qt/CPP/QML.
Any suggestions are appreciated.
Regards,
Rohith.G
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.13
Window {
width: 640
height: 480
visible: true
title: qsTr(“Hello World”)
Item {
width:1920
height: 1080
Popupone {
id:popup1
visible:false
anchors.centerIn:parent
// Connect the signal to a function
}
}
Item{
width:1920
height: 1080
Popuptwo{
id:popup2
visible:false
anchors.centerIn:parent
}
}
Timer {
id:timer
interval:1000
running:false
repeat:true
onTriggered: {
this fun will call every second
communicationbwleapHMI.getfuns();
}
}
Timer {
id:timer1
interval:1000
running:false
repeat:true
onTriggered: {
this fun will call every second
communicationbwleapHMI.getfun2();
}
}
}
Raja is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.