Subject: | PerlQt - QSlider incorrectly freed |
Using perl 5.8.2 on i686-linux (mostly built from source), PerlQt 3.008, Qt 3.3.1.
The bundled t6.pl tutorial shows only the LCD numbers, not the sliders.
I turned on full debug (use Qt::debug qw(all)) and added some more debug warn()s to Qt.xs and Qt.pm and it looks like QSlider's having the wrong ON_DESTROY called for it. Qt::Slider's @ISA is qw(Qt::RangeControl Qt::Widget) and since Qt::RangeControl inherits from Qt::base and not Qt::Object, Qt::Object::ON_DESTROY doesn't get a chance to stop the object from being destroyed (because it has a parent).
I'm not sure what the best solution to this is - perhaps ordering @ISA so a base derived from QObject is first? I'd be happy to help with a solution but didn't want to work on a patch without checking first.
If I do insert something like 'push @Qt::Slider::ISA, shift @Qt::Slider::ISA' in my code before the slider is created, the problem goes away.
HTH and thanks for the time you've put into PerlQt.