I would like to ask something. I do not change address manually.
I should explain my app little.
//receiving struct
struct MyObj{
İnt id;
QTimer *timer = nullptr;
}
//socket tcp
void readyRead(){
QList<MyObj> objs;
//data parsing here and append list(MyObj)
emit sendObjs(objs);
}
//mainwindow
void receiveObjs(QList<MyObj> objs){
// I control here objs is exist or not
// I took _objs list in mainwindow and control with new objs list receiving obj id. İf id exist in _objs update pareters, or id do not exist in _objs MyObj append to list
for(MyObj &obj : objs){
İf(do not exist){
//start remove timer
Obj.timer = new Timer
Obj.timer->serSingleshoot(true);
Connect(obj.timer … {
removeObj(obj.id);
});
Obj.timer->start(15000);
addTable(obj)
_objs.append(obj);
}
else{
// id control in _objs and updare parameters
// timer start again
// addTable again
}
}
//send _obs list to somewhere, it just set to list local as parameters
}
Void removeObj(id){
//stop timer
//remove from table
//remove from_objs list
}
Void addTable(MyObj obj){
// id check
// if rows has id, update row
// else add new row
}
So, I take data from tcp socket as they are some object and, I send to main for update my list, also I check received objects still exist or not, İf they not remove.
Now. How _objs list address broken?
I have written on mobile device, sorry for bas syntax;