RSS | Module Info | Add a review of Qt

3 out of 3 found this review helpful:

Qt (0.96.0) ***

Yes, the module comes with a lot of examples but only very few POD. If you are familiar with Qt programming at C++ level you'll probably find the interface quite similar. If you are not (like me) it takes quite a bit of guess work to get things working. A big help is also doc.qt.nokia.com/4.7/index.html. It took me 2 days to put an icon in the KDE4 systray, add a menu to it, add actions that start various processes, process STDERR and STDOUT of those processes and display the STDERR in a tabbed main window. I hadn't written a single KDE program before.

The module (version 0.96.0) contains a few subtle bugs. First (not so subtle) it relies on Alien::SmokeQt but does not mention it as a prerequisite.

The second problem is much more subtle and you'll understand it only with a bit of XS programming experience. See:

perl -Mstrict -MQtCore4 -e 'Qt::String("xx")'

Modification of a read-only value attempted at /.../5.12.3/x86_64-linux/QtCore4.pm line 1800.

But

perl -Mstrict -MQtCore4 -e 'Qt::String(my $x="xx")'

succeeds. The point here is that &Qt::String does not make its own copy of the passed string but tries to modify the one passed by reference. There are more manifestations of the same problem. Best if you pass in only normal variables. Avoid passing such things like $1, $2, etc. directly to Qt::* functions. I had a case when I passed $1 to a signal like "emit signal($1)". Then at an other place in the program I used an other regexp and surprisingly $1 kept the value that was emitted in signal($1) although the other regexp had matched several times. The problem went away when the code was changed into "my $s=$1; emit signal($s)".

Torsten Förtsch - 2011-07-23T11:44:26

Was this review helpful to you?  Yes No
2 out of 3 found this review helpful:

Qt (0.96.0) ****

package has a lot of examples.

ryan - 2011-07-06T09:17:53

Was this review helpful to you?  Yes No


the camel