Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Clear an Array? how to clear array
ganaa last edited by
i have an array that should be cleared if any number inside is not greater than 300.
I have a device that sends data continuously to the QT GUI. And the array records them continuously into it.
And i start my project if any of number greater than 300 comes.
So array size becomes larger than array limit as time goes by and stopped working appears so i should do force stop.
so need to clear the array if any number inside the array is not greater than 300.
(i can not record data into array after number greater than 300 appears by some issue..........do not offer me that.)
Just i need to know how to clear or resize or reinitialize or any other thing that make it empty or .......
any example please?
What is your array type? If you use QVector, call QVector::clear()
http://qt-project.org/doc/qt-5/qvector.html#clear (read the whole page to learn how to use QVector)
Sanchir Kartiev last edited by
Dynamic array is from STL or Qt?