[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] Qt, Qyoto buttons work intermediately
From:       Arno Rehn <arno () arnorehn ! de>
Date:       2010-02-15 12:57:39
Message-ID: 201002151357.39728.arno () arnorehn ! de
[Download RAW message or body]

On Monday 15 February 2010 09:09:31 linuxoidoz@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.

-- 
Arno Rehn
arno@arnorehn.de
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic