I have x, y variables that are constantly changing
Only when user clicks a button will the x, y variable at that time be stored in array
Created button & linking to function ->no problem
not sure how to go about the array part
this is my code:
.h
Code:
private: QList<int> ArrayX; QList<int> ArrayY;
Code:
void my_qlabel::transferValues() { //counter initialised to 0 in constructor Counter += 1; ArrayX[Counter] = x; ArrayY[Counter] = y; }
Is the array Declared properly (array Has to be dynamic as it can increase as many time user pushes button)
Do I have to use the .append???
please provide me with sample code on qlist if possible?
Thanks