[Kde-perl] Couple of problems with Qt::TextEdit - one serious

Rich kde-perl@mail.kde.org
Mon, 3 Mar 2003 15:47:49 +0000


Hi everyone

I've got one non-serious and one deadly problem with Qt::TextEdit.

1) Appending text to textedit widgets in "log viewer" mode in Qt3.1x caus=
es a=20
spurious new line to get added between each text chunk. I've looked at th=
e=20
archive from a recent discussion:

  http://lists.kde.org/?l=3Dkde-perl&m=3D104525628210582&w=3D2

So, am I correct in assuming this is a PerlQt issue that is known about?

2) I can blow Qt up with ease:

############################################################

use strict;

use Qt;

my $app    =3D Qt::Application(\@ARGV);
my $widget =3D Qt::TextEdit;
my $string =3D "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n" x 100000;

{
  use bytes ();

  print "Displayed text size: ", bytes::length($string), "\n";
}

$widget->resize(600,480);
$widget->setText($string);

$app->setMainWidget($widget);

$widget->show;

$app->exec;

############################################################

If I run the above, right click and choose "Select all" the app crashes w=
ith=20
the message "Broken pipe". I've tried this with perl 5.8, PerlQt 3.006, =20
Qt3.0.5 and Qt3.1.1 with Mandrake and SuSE and the behaviour is the same.

Ok, the string is a reasonable size but not huge, and my machines have 51=
2M=20
memory. Can other folks on the list try the above code and see if they ge=
t=20
the same behaviour?

Can anyone suggest if this is a PerlQt or Qt issue?

Many thanks,
--=20
Rich
scriptyrich@yahoo.co.uk