[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KConfigDialog question
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-03-27 17:47:05
Message-ID: 200403271847.05630.bastian () kde ! org
[Download RAW message or body]

-----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 <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic