[Kde-bindings] Qt, Qyoto buttons work intermediately

linuxoidoz at yahoo.com.au linuxoidoz at yahoo.com.au
Mon Feb 15 13:34:09 UTC 2010

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?

------------------  Original Message  ------------------
Subject: Re: [Kde-bindings] Qt, Qyoto buttons work intermediately
Date: Mon, 15 Feb 2010
From: Arno Rehn <arno at arnorehn.de>
To: KDE bindings for other programming languages <kde-bindings at kde.org>

> On Monday 15 February 2010 09:09:31 linuxoidoz at yahoo.com.au wrote:
> > Well, even more apparently it's not even those but the order of these two:
> > 
> > menuBar.Enabled = true;
> > this.SetMenuBar(menuBar);
> > 
> > If I put them right after
> > 
> > menuBar = new QMenuBar(this);
> > 
> > the menu bar appears. If I put them after all the menus and actions, the
> > menu doesn't appear? How come?
> It has nothing to do with the order of anything. The menubar is there. I have 
> it here. If you don't set a title, it's just 1px high. But I can click the 
> first menu and it appears just fine. If I add menuFile.Title = "File..."; 
> somewhere, the menu gets a title and consequently the menu bar grows. 
> QMenuBar.Enabled is inherited from QWidget and doesn't have anything to do 
> with visibility. It changes whether the widget is active or inactive, i.e. 
> whether you can click it or not. And the property is set to true by default.
> WRT to your second problem: I don't have a clue yet. Your class layout is 
> quite strange, but I try to track the problem it down. It probably has to do 
> something with objects being collected by the GC at the wrong time. If you add 
> a reference to any of the button's MetaObject(), it magically starts working. 
> That's probably a bug; I'll investigate.

More information about the Kde-bindings mailing list