Obsolete Members for QVarLengthArray
I seguenti membri della classe ` QVarLengthArray ` sono deprecati. Sono forniti per garantire il funzionamento del codice sorgente esistente. Si sconsiglia vivamente di utilizzarli nel codice nuovo.
Funzioni pubbliche
Documentazione sulle funzioni membro
[deprecated in 6.3] void QVarLengthArray::prepend(T &&value)
[deprecated in 6.3] void QVarLengthArray::prepend(const T &value)
Questa funzione è deprecata a partire dalla versione 6.3. Si sconsiglia vivamente di utilizzarla nel codice nuovo.
È lenta. Se proprio necessario, utilizzare invece ` insert(cbegin(), ~~~) `.
Inserisce value all'inizio dell'array.
È equivalente a vector.insert(0, value).
Per array di grandi dimensioni, questa operazione può risultare lenta (tempo lineare), poiché richiede lo spostamento di tutti gli elementi del vettore di una posizione più avanti nella memoria. Se si desidera una classe contenitore che fornisca una funzione prepend() veloce, utilizzare invece std::list.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.