Re: Converting Qt4 QString to ordinary Perl string
Gary Greene <[email protected]> Thu, 18 Jun 2009 08:34:05 -0700
| Newsgroups | gmane.comp.kde.devel.perl |
|---|---|
| Organization | YggdrasilSoft, LLC. |
| Message-ID | <[email protected]> |
--===============1621280214==
Content-Type: multipart/signed;
boundary="nextPart6130274.5ZxkjuvXkX";
protocol="application/pgp-signature";
micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
--nextPart6130274.5ZxkjuvXkX
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On Wednesday 17 June 2009 05:22:20 am Richard Dale wrote:
> On Tuesday 16 June 2009 09:46:27 pm Chris Burel wrote:
> > As I recall from when I looked at that version of the binding from a
> > year ago, you have to go through a roundabout method to get the data
> > out of the QString object.
> >
> > my $i =3D 0;
> > my $perlStr =3D '';
> > while( $i < $string->count() ) {
> > $perlStr .=3D chr( $string->at($i)->cell() );
> > $i++
> > }
> > print $perlStr;
> > Hi there
> >
> > Very difficult. This was one of the reasons the smoke-based PerlQt4
> > project was started. The link has already been posted.
>
> One related point is that in PerlQt Qt3, a QByteArray was mapped onto a
> Perl string. But I found that was more trouble than it's worth in QtRuby,
> and so Qt::ByteArray is now a class, and not a string anymore.
>
> -- Richard
> _______________________________________________
> Kde-perl mailing list
> [email protected]
> https://mail.kde.org/mailman/listinfo/kde-perl
As long as there is a way to convert TO a string for QByteArrays that=20
shouldn't be too much of a problem. (Yes, I've run into code that needs=20
that.)
=2D-=20
Gary L. Greene, Jr.
Sent from: peorth.tolharadys.net
08:33:06 up 45 days, 59 min, 3 users, load average: 0.39, 0.58, 0.61
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Developer and Project Lead for the AltimatOS open source project
Volunteer Developer for the KDE open source project
See http://www.altimatos.com/ and http://www.kde.org/ for more information
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Please avoid sending me Word or PowerPoint attachments.
--nextPart6130274.5ZxkjuvXkX
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.2 (GNU/Linux)
iD8DBQBKOl5x+psNrGG9CbMRAoAwAKC98Y05nI5F63vLwblWgzs5VP4P4wCgl/VR
du+Dbbf9IAAtGOZS8H7ft9g=
=7lfR
-----END PGP SIGNATURE-----
--nextPart6130274.5ZxkjuvXkX--
--===============1621280214==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Kde-perl mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-perl
--===============1621280214==--