On Thursday 09 March 2006 12:06, Sheraz wrote:
> Hi
>
> I ma using KColorDialog in Other QDialog. by usring
> ..::reparent...so that KColorDialog looks contained in
> my Dialog.
>
> Now one can easily pick the color from available color
> pickers......but there is one picker at the right side
> of kcolordialog that shows colors in small
> squares....default behaviour of kcolordialog is when
> someone double clicks on those color squares it closes
> the dialog box after selection.....
>
> Now the same close behaviour can bee seen on my Dialog
> where i am displaying kcolordialog....
> how can i stop this close on double click of a color ?


Solution 1: find the widget using Qt's introspection (after reading the kcolordialog sources) and disconnect it.
Solution 2: derive from KColorDialog and reimplement accept(), to make it do nothing. Probably easier.

Long-term solution: contribute a KColorWidget/KColorDialog separation for kdelibs trunk (kde 4) :-)

--
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<