From kde-devel Wed Jul 12 01:38:40 2006 From: Jason Harris Date: Wed, 12 Jul 2006 01:38:40 +0000 To: kde-devel Subject: KEditToolbar Message-Id: <200607111838.41202.kstars () 30doradus ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=115266838112453 Hi, I'm trying to implement editable toolbars for KStars. I've got: void KStars::slotConfigureToolbars() { saveMainWindowSettings( KGlobal::config(), "MainWindow" ); KEditToolbar ket = new KEditToolbar(actionCollection()); connect(ket,SIGNAL(newToolbarConfig()),this,SLOT(slotApplyToolbarConfig())); //ket.exec(); //DEBUG if ( ket.exec() == QDialog::Accepted ) { kDebug() << "KEditToolbar dialog returned Accepted" << endl; } } void KStars::slotApplyToolbarConfig() { //DEBUG kDebug() << "Recreating GUI..." << endl; createGUI(); applyMainWindowSettings( KGlobal::config(), "MainWindow" ); } ...and slotConfigureToolbars() is connected to KStdAction::configureToolbars(). This is basically straight from the KEditToolbar API dox. The KEditToolbars dialog opens and behaves just fine, but on pressing Apply or Ok, the toolbar does not get updated to reflect the changes I made, and I never see my "Recreating GUI" debug message (so it's never getting to slotApplyToolbarConfig() ). I do get the "KEditToolbar dialog returned Accepted" debug message. Another weirdness is that after pressing "Apply", the "Apply" button does not get disabled. Looking at kedittoolbar.cpp, slotApply() both disables the Apply button and emits the newToolbarConfig() Signal, so it seems this slot is never being reached. Indeed, there's no connect() statement involving slotApply() in kedittoolbar.cpp. Anyone have a clue about this? thanks in advance, Jason -- ------------------------------- KStars: http://edu.kde.org/kstars Forums: http://kstars.30doradus.org >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<