[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: KEditToolbar
From: Jason Harris <kstars () 30doradus ! org>
Date: 2006-07-12 1:38:40
Message-ID: 200607111838.41202.kstars () 30doradus ! org
[Download RAW message or body]
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 <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic