Diffstat (limited to 'kaddressbook/views/colorlistbox.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/views/colorlistbox.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp index c243fa0..7386207 100644 --- a/kaddressbook/views/colorlistbox.cpp +++ b/kaddressbook/views/colorlistbox.cpp @@ -33,4 +33,5 @@ ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) { connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); + connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); setAcceptDrops( true); } @@ -75,5 +76,9 @@ QColor ColorListBox::color( uint index ) const } } - +void ColorListBox::slotNewColor(QListBoxItem * i) +{ + if ( i ) + newColor( index( i ) ); +} void ColorListBox::newColor( int index ) |