[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KToolBar Bug
From: David Faure <david () mandrakesoft ! com>
Date: 2000-04-23 22:16:27
[Download RAW message or body]
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");
> 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 ?
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 !?!?
> 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>
>
> 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.
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic