[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Question about QVector and QArray
From: "Ben Schepens" <schepens () mindspring ! com>
Date: 2001-07-21 17:00:16
[Download RAW message or body]
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
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3103.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Sorry for the dumb newbie question,
but...<BR><BR>How does one add elements dynamically to<BR>QT's QArray ro
QVector? I have used MS's Array<BR>classes and the STL vector class, both
of which provide<BR>dynamic allocation/insertion/removal functions.<BR><BR>I
want to have an ordered random access list of objects<BR>that can have items
inserted into the middle dynamically or<BR>appended to the end. How
do I do that with QT's<BR>collection objects?<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I know I could resize them and shift the elements
around myself</FONT></DIV>
<DIV><FONT face=Arial size=2>but that seems dumb. Is there a better
way?</FONT></DIV>
<DIV><FONT face=Arial size=2><BR>Thanks,<BR>Ben Schepens<BR>schepens -@-
mindspring -DOT- com<BR><BR></DIV></FONT></BODY></HTML>
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic