[Kde-bindings] Qt, Qyoto buttons work intermediately

Richard Dale rdale at telefonica.net
Mon Feb 15 13:50:47 UTC 2010


On Monday 15 February 2010 01:34:09 pm linuxoidoz at yahoo.com.au wrote:
> Thank you. The menu works perfectly now. But the more I play with the
> signals/slots, the more I tend to suspect it's completely buggy.
> 
> I take proven functions (like ShowAbout) on the very first window which
> should work, I build the project, click any buttons  - nothing works. I
> close the window, rebuild the project, everything works. Close the window,
> rebuild the project, some buttons work, some don't. Rebuild it again -
> they may work again 2 out of 3 times. Really strange. I thought I was
> doing something wrong, but this behavior certainly tells me it's not me.
> Do you get the same problems with working/non-working controls?
It looks like a garbage collection problem. I don't think it is a problem with 
signals and slots, but if the thing you connected to got garbage collected it 
will mean that any slots in that thing will no longer be called. So if a UI 
element seems to stop working, then see if you can save in a variable 
belonging to the class so that it doesn't get garbage collected.
 
You can try turning on the debug tracing options in Qyoto. See the Qyoto.cs 
source at the start - there is an option to log garbage collection by adding 
the following:

QDebug.SetDebug(QtDebugChannel.QTDB_GC);

It is very verbose, and so you may need to redirect your program's output to a 
log file to make it easier to analyse the output.

-- Richard



More information about the Kde-bindings mailing list