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

List:       kde-devel
Subject:    adding a menu to a KMainApplication
From:       Lorenzo Bettini <bettini () dsi ! unifi ! it>
Date:       2007-11-26 13:30:40
Message-ID: 474ACA80.3050703 () dsi ! unifi ! it
[Download RAW message or body]

Hi

I'm using this method in my KMainApplication

void sourcehighlightide::setupActions()
{
     KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
     KStdAction::open(this, SLOT(fileOpen()), actionCollection());
     saveAct = KStdAction::save(this, SLOT(fileSave()), actionCollection());
     saveAsAct = KStdAction::saveAs(this, SLOT(fileSaveAs()), 
actionCollection());
     //KStdAction::print(this, SLOT(filePrint()), actionCollection());
     KStdAction::quit(kapp, SLOT(quit()), actionCollection());

     KStdAction::preferences(this, SLOT(optionsPreferences()), 
actionCollection());


     KPopupMenu *windowsMenu = new KPopupMenu( this );
     windowsMenu->setCheckable( TRUE );
     connect( windowsMenu, SIGNAL( aboutToShow() ),
              this, SLOT( windowsMenuAboutToShow() ) );
     menuBar()->insertItem( "&Windows", windowsMenu );

     menuBar()->insertItem("Foo", new KPopupMenu(this));
}

but the menus added with menuBar()->insertItem are not shown at all...

am I doing something wrong?

thanks in advance
	Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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