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

List:       kde-devel
Subject:    createGUI not giving me a help menu
From:       "Dr. David Alan Gilbert" <gilbertd () treblig ! org>
Date:       2003-08-25 0:20:36
[Download RAW message or body]

(I'm not subscribed to this list, I'd appreciate a cc but will check
back on the lists)

Hi,
  I'm somewhat stumped as to why createGUI isn't giving me a help menu;
I have a class ('designWin') subclassed from KMainWindow.

The start of the constructor looks like:

designWin::designWin( const char * name)
    : KMainWindow( 0L, name)
{
    (void)statusBar();
          setName( "designWin" );
    KStdAction::open(this, SLOT(fileOpen()), actionCollection());
    KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
.... more stdactions.....
    createGUI("kesch.rc");

My .rc file happily causes the menu entries for file and edit to appear:

----------------------------------------------------------------------
<!DOCTYPE partgui SYSTEM "kpartgui.dtd">
<kpartgui name="kesch" >
  <MenuBar>
    <Menu noMerge="1" name="file"><text>&amp;File</text>
      <Action name="file_open" />
      <Action name="file_new" />
      <Action name="file_save" />
      <Action name="file_save_as" />
      <Separator />
      <Action name="file_print" />
      <Separator />
      <Action name="file_quit" />
    </Menu>
    <Menu noMerge="1" name="edit"><text>&amp;Edit</text>
      <Action name="edit_undo"/>
      <Action name="edit_redo"/>
      <Action name="edit_cut"/>
      <Action name="edit_copy"/>
      <Action name="edit_paste"/>
      <Action name="edit_find"/>
    </Menu>
  </MenuBar>
  <ToolBar noMerge="1" name="mainToolBar" >
   <text>Main Toolbar</text>
   <Action name="file_open" />
   <Action name="file_new" />
   <Action name="file_save" />
   <Action name="file_print" />
   <Separator />
   <Action name="edit_undo"/>
   <Action name="edit_redo"/>
   <Action name="edit_cut"/>
   <Action name="edit_copy"/>
   <Action name="edit_paste"/>
   <Action name="edit_find"/>
  </ToolBar>
</kpartgui>
----------------------------------------------------------------------

but I don't get a help menu.  Adding:

menuBar()->insertItem( i18n("&Help"), helpMenu() );

makes it work fine - but my reading seemed to imply that help menus were
added automatically unless you turned them off (and turning it on
explicitly with setHelpMenuEnabled doesn't help).

Is my understanding wrong or have I screwed up somewhere.

This is my first KDE app.

Thanks in advance for any help,

Dave

P.S. Without the 'noMerge' in the rc file all the entries are repeated
twice.


 ---- Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
 
>> 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