diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbcombodropdown_p.cpp --- a/src/hbwidgets/widgets/hbcombodropdown_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombodropdown_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -25,22 +25,26 @@ #include "hbcombodropdown_p.h" #include "hbcombobox_p.h" +#include "hbwidget_p.h" #include #include -#ifdef HB_GESTURE_FW #include #include -#endif +#include +class HbComboDropDownPrivate : public HbWidgetPrivate +{ +}; HbComboDropDown::HbComboDropDown( HbComboBoxPrivate *comboBoxPrivate, QGraphicsItem *parent ) - :HbWidget( parent ), + :HbWidget( *new HbComboDropDownPrivate(), parent ), mList( 0 ), comboPrivate( comboBoxPrivate ), vkbOpened( false ), backgroundPressed( false ) { - setBackgroundItem( HbStyle::P_ComboBoxPopup_background ); + Q_D(HbComboDropDown); + d->setBackgroundItem(HbStyle::P_ComboBoxPopup_background); #if QT_VERSION >= 0x040600 //this is to keep the focus in the previous widget. setFlag( QGraphicsItem::ItemIsPanel, true ); @@ -100,10 +104,13 @@ { if( !this->isUnderMouse( ) ) { //if its a pan gesture then don't accept the event so that list can be scrolled - //even if mouse is outside drop down area - if( QGestureEvent *gestureEvent = static_cast( event ) ) { + //even if mouse is outside drop down area. Also tap might finish outside the + //dropdown area + if( QGestureEvent *gestureEvent = static_cast( event ) ) { + HbTapGesture *tapGesture = qobject_cast(gestureEvent->gesture(Qt::TapGesture)); if( !qobject_cast( - gestureEvent->gesture( Qt::PanGesture ) ) ) { + gestureEvent->gesture( Qt::PanGesture ) ) && + !(tapGesture && tapGesture->state() != Qt::GestureStarted)) { accepted = true; } }