Re: Converting Qt4 QString to ordinary Perl string

Gary Greene <[email protected]> Sat, 13 Jun 2009 00:14:43 -0700
Newsgroups gmane.comp.kde.devel.perl
Organization YggdrasilSoft, LLC.
Message-ID <[email protected]>
--===============0669698166==
Content-Type: multipart/signed;
  boundary="nextPart1941116.BAAfhbRZ1P";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit

--nextPart1941116.BAAfhbRZ1P
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Friday 12 June 2009 03:37:53 pm Adam Bar wrote:
> Hello everyone,
>
> My question is maybe stupid, but I am looking for few hours for the
> solution - how to get string value from variable blessed QString?
> my $str =3D 'string';
> my $obj =3D QString($str);
> # how to get 'string' from $obj ?
>
> Methods like latin1(), ascii() are not defined in my perl binding.
>
> I am using Perl Qt 4.004, Perl 5.8.8.
>
> Thanks in advance!
> Adam
> _______________________________________________
> Kde-perl mailing list
> [email protected]
> https://mail.kde.org/mailman/listinfo/kde-perl

Probably you'll have to marshal using some custom code in those bindings th=
e=20
data from Qt using std::string QString::toStdString into Perl's SVpv. See =
=20
http://doc.trolltech.com/4.5/qstring.html#toStdString for info on that=20
method.

=2D-=20
Gary L. Greene, Jr.
Sent from: peorth.tolharadys.net
 00:02:57 up 39 days, 16:29,  3 users,  load average: 0.65, 0.66, 0.59
=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.

--nextPart1941116.BAAfhbRZ1P
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)

iD8DBQBKM1Hr+psNrGG9CbMRArYdAKDMKevtMmMjS8Htr6kOYJVAhDI9QgCeN2Fu
CrEMCv/+Vl//icnS3vYFw2g=
=3ONi
-----END PGP SIGNATURE-----

--nextPart1941116.BAAfhbRZ1P--

--===============0669698166==
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

--===============0669698166==--