From kde-devel Sat Mar 27 17:47:05 2004 From: Waldo Bastian Date: Sat, 27 Mar 2004 17:47:05 +0000 To: kde-devel Subject: Re: KConfigDialog question Message-Id: <200403271847.05630.bastian () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=108040907820488 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat March 27 2004 19:54, Jason Harris wrote: > Hello, > > In my config dialog, I have a listbox widget which contains a list of > checkboxes. Toggling these checkboxes does not automatically enable > the dialog's "Apply" button, and I am trying to figure out how to make > that happen. > > My config dialog has several pages, each of which is a QWidget added to > the KConfigDialog. The KConfigDialog is constructed and shown by the > KStars::slotViewOps() function. This is where I tried to get the Apply > button to be enabled when those checkboxes change, by adding this line: > > connect( opcatalog->CatalogList, SIGNAL( clicked( QListViewItem* ) ), > opsdialog, SIGNAL( widgetModified() ) ); > (where "opsdialog" is the KConfigDialog, "opcatalog" is one of the > QWidgets added as a page of the dialog, and "CatalogList" is the > listbox containing the checkboxes) > > I was hoping that emitting the "widgetModified()" signal would enable > the Apply button (since it is connected to the "updateButtons()" slot), > but it does not. > > I also tried some kludgier solutions, but so far nothing has worked. > Can anyone help me? You must reimplement the virtual hasChanged() and isDefault() functions. Cheers, Waldo - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ^ bastian@kde.org | Is your software SUSE LINUX READY? | bastian@suse.com ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAZb4ZN4pvrENfboIRAmOvAJ4041czLVCTdJfyxRV/BfYGgbnSPgCeJZTv 2Jy4ps02RfePNdtLyBi9DDs= =4SHU -----END PGP SIGNATURE----- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<