I am communicating with a web server using my Qt application. I’am getting the response which contains a list of strings. So i’am storing the response into a QStringList. I have to display those string values in another form. How can i pass this list to another form.
Share
Since
QStringList(effectivelyQList<QString>) is part of Qt’s generic containers family, it uses implicit sharing. This means that if you pass-by-value, you’ll only perform a shallow copy, which is to say that you’ll effectively only be passing the thin book-keeping part of the data structure – a pointer to a larger block of data which exists elsewhere. This block of data only needs to exist in one place (on the heap) but can be referenced by multipleQLists.Do something like: