Solved How to get data from URL/.php file and display in my fields
-
-
-
@Vineela said in How to get data from URL/.php file and display in my fields:
I've done this too but got only second one so
Yes, if you do this in a loop then you need to use index (i in your case) instead of fix numbers.
-
@jsulm well thank u so much for your help ,I've done it using for loop it worked.
-
@jsulm can u suggest here how to make it in ascending order???
-
for(int i = array.size() - 1 ; i >= 0; --i) { QJsonObject object = array.at(i).toObject(); }
-
@jsulm thanks you've saved my day :D it worked fine.
-
@jsulm my data is getting repeated once i come back is that bcoz of my for loop?
-
@Vineela Not sure what you mean?
You mean if you get new data and add new entries to your combo box you then have same values several times?
In this case you need to filter new values and only add values which are not yet in the box. -
@jsulm yes thnks i cleared the combo box before navigating to that page its ok now