From kde-devel Sat Jul 21 17:00:16 2001 From: "Ben Schepens" Date: Sat, 21 Jul 2001 17:00:16 +0000 To: kde-devel Subject: Question about QVector and QArray X-MARC-Message: https://marc.info/?l=kde-devel&m=99573481622421 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------=_NextPart_000_0013_01C111E5.993FE910" This is a multi-part message in MIME format. ------=_NextPart_000_0013_01C111E5.993FE910 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sorry for the dumb newbie question, but... How does one add elements dynamically to QT's QArray ro QVector? I have used MS's Array classes and the STL vector class, both of which provide dynamic allocation/insertion/removal functions. I want to have an ordered random access list of objects that can have items inserted into the middle dynamically or appended to the end. How do I do that with QT's collection objects? I know I could resize them and shift the elements around myself but that seems dumb. Is there a better way? Thanks, Ben Schepens schepens -@- mindspring -DOT- com ------=_NextPart_000_0013_01C111E5.993FE910 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Sorry for the dumb newbie question,=20 but...

How does one add elements dynamically to
QT's QArray ro = QVector?  I have used MS's Array
classes and the STL vector = class, both=20 of which provide
dynamic allocation/insertion/removal = functions.

I=20 want to have an ordered random access list of objects
that can have = items=20 inserted into the middle dynamically or
appended  to the = end.  How=20 do I do that with QT's
collection objects?
I know I could resize them and shift = the elements=20 around myself
but that seems dumb.  Is there a = better=20 way?

Thanks,
Ben Schepens
schepens = -@-=20 mindspring -DOT- com

------=_NextPart_000_0013_01C111E5.993FE910-- >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<