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

List:       kde-devel
Subject:    problem creating toolbar from xml file
From:       Marco Mussini <marcomus () aliceposta ! it>
Date:       2004-09-02 16:14:31
Message-ID: 200409021814.31766.marcomus () aliceposta ! it
[Download RAW message or body]

I'm trying to put a simple toolbar with two action in my test application.
I can see the toolbar but it's empty, no icons are visible.
This is my xml file and a piece of code where I define actions:

<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="menutest" version="1">
<!-- Menubar definition -->
<MenuBar>
  <Menu name="custom"><text>C&amp;ustom</text>
    <Action name="custom_action" />
	<Action name="my_gray_entry" />
	<Action name="my_checkable_entry"/>
	<Separator/>
	<Action name="rectangle"/>
	<Action name="pencil"/>
  </Menu>
</MenuBar>
<!-- Toolbar definition -->
<ToolBar name="toolBoxToolBar">       <<<<----- MY TOOLBAR <<<<<<
	<text>Tools Toolbar</text>
	<Action name="rectangle"/>
	<Action name="pencil"/>
</ToolBar>
</kpartgui>

void MenuTest::setupActions()
{
	.............
    rectangle = new KRadioAction ("Rectangle select", "rectangle_select", 0,
                       			  this, SLOT(doNothing()),
                       			  actionCollection(), "rectangle");
    rectangle->setExclusiveGroup("tools");
    pencil = new KRadioAction ("Pencil", "pencil", 0, this,
					SLOT(doNothing()),
                       			actionCollection(), "pencil");
    pencil->setExclusiveGroup("tools"); 
    rectangle->setChecked(true);
	
    createGUI();

    toolBar("toolBoxToolBar")->setBarPos(KToolBar::Top);
}
 
>> 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