From kde-core-devel Sun Jan 02 21:26:13 2005 From: Albert Astals Cid Date: Sun, 02 Jan 2005 21:26:13 +0000 To: kde-core-devel Subject: Re: KToogleAction not working? Message-Id: <200501022226.13772.astals11 () terra ! es> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110470117723042 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_1bG2BgrQw9Gy2/X" --Boundary-00=_1bG2BgrQw9Gy2/X Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, Enrico Ros have spoted the problem, if you revert to that files cvs up -r 1.321 kaction.cpp cvs up -r 1.185 kaction.h cvs up -r 1.81 ktoolbarbutton.cpp cvs up -r 1.37 ktoolbarbutton.h cvs up -r 1.346 kactionclasses.cp The radioactions and toogleactions inside kpdf work, my old sample code doe= s=20 not but the new i send does work (missed the actionCollection bit i supose). Can anyone with deeper KAction knowledge try to fix it? Thanks Albert and Enrico A Diumenge 02 Gener 2005 21:04, Ingo Kl=F6cker va escriure: > On Sunday 02 January 2005 19:40, Albert Astals Cid wrote: > > 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? > > I'm using an older KDE_3_3_BRANCH version of kdelibs. Here the > KRadioAction is checked the first time I click on it. Further clicking > unchecks/checks it. The KRadioActions are all checked when first > clicked, but they remain checked when another one is checked and thus > can't be unchecked. > > Regards, > Ingo --Boundary-00=_1bG2BgrQw9Gy2/X Content-Type: text/x-c++src; charset="iso-8859-15"; name="main.cpp" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="main.cpp" #include #include #include #include #include #include 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", KShortcut(), actionCollection(), 0); kra->plug(toolBar()); kra->setExclusiveGroup("G"); KRadioAction *kra2 = new KRadioAction("2", KShortcut(), actionCollection(), 0); kra2->plug(toolBar()); kra2->setExclusiveGroup("G"); KRadioAction *kra3 = new KRadioAction("3", KShortcut(), actionCollection(), 0); 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(); } --Boundary-00=_1bG2BgrQw9Gy2/X--