<br><br><div class="gmail_quote">On Tue, Jan 6, 2009 at 5:38 AM, 0xDeadC0de <span dir="ltr"><<a href="mailto:roguestar191@comcast.net">roguestar191@comcast.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I was hopeing someone (Rdale maybe? ;) could help me with this one, when I try:<br>
<br>
class GloweyLabel < Plasma::Label<br>
slots 'linkHovered()',<br>
def initialize(par=nil)<br>
super nil<br>
Qt::Object.connect(self.nativeWidget, SIGNAL("linkHovered(QString)"), self, SLOT("linkHovered()") )<br>
end<br>
def linkHovered()<br>
puts 'link hovered'<br>
Plasma::Animator.self.animateElement(self, Plasma::Animator::ActivateAnimation)<br>
end<br>
end<br>
<br>
It crashes quickly after a linkHovered event. hmm<br>
<br>
Trying to get any kind of animation on the label when a link is hovered in it<br>
</blockquote><div>This is probably a garbage collection issue. Try adding 'GC.disable' to the constructor for the applet and see if that makes a difference. When you create a widget, always pass it a parent as the qtruby runtime uses trees of QObjects/QWidgets to determine what instances can be allowed to be GC'd. If an instance doesn't have a parent it will be GC'd if there are no corresponding instances left in the Ruby world. You may need to change some variables to be instance variables to avoid the instances being GC'd - ie 'foobar' becomes '@foobar' in your code.<br>
<br>If it is GC problem and adding parent widgets doesn't fix it, you can turn on GC tracing like this:<br><br>Qt::Internal::setDebug Qt::QtDebugChannel::QTDB_GC<br><br>-- Richard <br></div></div><br>