[Kde-perl] QListViewItem
Arnaud DUPUIS
a.dupuis at infinityperl.org
Fri Oct 27 12:14:54 CEST 2006
Try this :
my $item = Qt::ListViewItem(listView1, undef);
$item->setText(0, trUtf8( join('', at array) ));
Your loop replace the text content each time you go through the loop, if you
absolutly want to use your loop modify it this way :
foreach loop. The code looks like this:
my $item = Qt::ListViewItem(listView1, undef);
foreach $line (@array) {
$item->setText(0, trUtf8($item->text(0)."$line"));
}
Good day.
Le vendredi 27 octobre 2006 11:24, crazyroot a écrit :
> Hi,
>
> I have listView on form , and I want to add data from array trough
> foreach loop. The code looks like this:
>
> my $item = Qt::ListViewItem(listView1, undef);
> foreach $line (@array) {
>
> $item->setText(0, trUtf8("$line"));
> }
>
> but, this add's only last record from array.
>
> Help please.
>
> _______________________________________________
> Kde-perl mailing list
> Kde-perl at kde.org
> https://mail.kde.org/mailman/listinfo/kde-perl
--
DUPUIS Arnaud
[ Infinity Perl ]
http://slackget.infinityperl.org
"Slackware : because it works"
slack-get : because it rocks !
=========================
gpg id : 0xAC37E1B0
=========================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-perl/attachments/20061027/150870c4/attachment.pgp
More information about the Kde-perl
mailing list