[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: KToogleAction not working?
From: Albert Astals Cid <astals11 () terra ! es>
Date: 2005-01-02 18:40:48
Message-ID: 200501021940.48930.astals11 () terra ! es
[Download RAW message or body]
Hi, today we saw several problems with KToggleAction in kpdf so i made a
simple test to send here and see if it is our code problem or is that
KToggleAction got weird.
The sample code creates a KToogleAction and 3 KRadioActions, the errors i see
are:
- The KRadioAction does not get "checked" the first time i click on it, then
it works
- The KRadioActions never get checked
Do you see the same? Or should i recompile all my kdelibs?
This is on HEAD
Albert
["main.cpp" (text/x-c++src)]
#include <kapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kmainwindow.h>
#include <kactionclasses.h>
#include <ktoolbar.h>
class MW : public KMainWindow
{
public:
MW() : KMainWindow()
{
createGUI();
show();
toolBar()->setIconText(KToolBar::TextOnly);
KToggleAction *kta = new KToggleAction("HELLO");
kta->plug(toolBar());
KRadioAction *kra = new KRadioAction("1");
kra->plug(toolBar());
kra->setExclusiveGroup("G");
KRadioAction *kra2 = new KRadioAction("2");
kra2->plug(toolBar());
kra2->setExclusiveGroup("G");
KRadioAction *kra3 = new KRadioAction("3");
kra3->plug(toolBar());
kra3->setExclusiveGroup("G");
}
};
int main(int argc, char** argv)
{
KAboutData about("test", I18N_NOOP("test"), "0.1");
KCmdLineArgs::init(argc, argv, &about);
KApplication app;
app.setMainWidget(new MW());
return app.exec();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic