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
private:
QList<int> ArrayX;
QList<int> ArrayY;
private:
QList<int> ArrayX;
QList<int> ArrayY;
To copy to clipboard, switch view to plain text mode
void my_qlabel::transferValues()
{
//counter initialised to 0 in constructor
Counter += 1;
ArrayX[Counter] = x;
ArrayY[Counter] = y;
}
void my_qlabel::transferValues()
{
//counter initialised to 0 in constructor
Counter += 1;
ArrayX[Counter] = x;
ArrayY[Counter] = y;
}
To copy to clipboard, switch view to plain text mode
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
Bookmarks