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

List:       kde-devel
Subject:    Re: KToolBar Bug
From:       Charles <charles () kde ! org>
Date:       2000-04-23 22:47:03
[Download RAW message or body]

On Sun, 23 Apr 2000, David Faure wrote:
> On Sun, Apr 23, 2000 at 03:05:41PM -0700, Charles wrote:
> > 
> > Pay attention to me people! :)
> > 
> > Source file
> > 
> > // Setup all the standard media actions
> > new KAction(i18n("Skip Back"), QIconSet(BarIcon("nback.png")), 0, this, \
> > SLOT(fileNew()), actionCollection(), "back");
> Huh.
> No QIconSet, no BarIcon, and no extension.
> =>
> new KAction(i18n("Skip Back"), "nback", 0, this, SLOT(fileNew()), \
> actionCollection(), "back"); 
ok.
> 
> > new KAction(i18n("&Back"), QIconSet(BarIcon("nfback.png")), 0, this, \
> > SLOT(fileNew()), actionCollection(), "skipback"); new KAction(i18n("S&top"), \
> > QIconSet(BarIcon("nstop.png")), 0, this, SLOT(fileNew()), actionCollection(), \
> > "play"); new KAction(i18n("&Play"), QIconSet(BarIcon("nplay.png")), 0, this, \
> > SLOT(fileNew()), actionCollection(), "pause"); new KAction(i18n("Fast &Forward"), \
> > QIconSet(BarIcon("nfforward.png")), 0, this, SLOT(fileNew()), actionCollection(), \
> > "stop"); new KAction(i18n("&Skip Forward"), QIconSet(BarIcon("nforward.png")), 0, \
> > this, SLOT(fileNew()), actionCollection(), "fastforward"); new \
> > KAction(i18n("&Playlist"), QIconSet(BarIcon("nplaylist.png")), 0, this, \
> > SLOT(fileNew()), actionCollection(), "forward");  
> > new KAction(i18n("Hide Display"), QIconSet(BarIcon("ntiny.png")), 0, view, \
> > SLOT(slotToggleView()), actionCollection(), "shrink");  
> > createGUI("noatun.rc");
> Does this compile ?
It also works :)

> Should be setXMLFile("noatun.rc")
> and eventually createGUI later on, if not in a KParts app.
> 
> > QSlider *sl=new QSlider(0,100,10, 0, Horizontal,toolBar());
> > sl->show();
> > 	
> > toolBar()->insertWidget(10, 0, sl, 6);
> If your app is an XML app, you shouldn't access the toolbar directly.
> Althought I don't know how you can put a slider in it !?!?
I looked into KonqAction stuff and ripped out the slider as an example.  

> 
> > toolBar()->setItemAutoSized(10, true);
> > 
> > XML .rc file:
> > 
> > <Toolbar fullWidth="true" name="mainToolBar">
> > 	<Action name="back"/>
> > 	<Action name="skipback"/>
> > 	<Action name="play"/>
> > 	<Action name="pause"/>
> > 	<Action name="stop"/>
> > 	<Action name="fastforward"/>
> > 	<Action name="forward"/>
> > 	<Separator/>
> > 	<Merge/>
> > 	<Separator/>
> > 	<Action name="shrink"/>
> > </Toolbar>
That's just a part of my XML file, I have the DocType thing

> > 
> > It's just not showing up.  And I'm convinced it's a bug in KToolBar.
> And I'm convinced you're doing a lot of things wrong ;-))))
> Without setXMLFile... it can't work.
Works for me without the setXMLFile.  Perhaps the libs are doing something
wrong :)

OffTopic: How to align a toolbar button to the right?


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

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