src/hbcore/gui/hbcontentwidget.cpp
changeset 28 b7da29130b0e
parent 21 4633027730f5
equal deleted inserted replaced
23:e6ad4ef83b23 28:b7da29130b0e
    54     mHidingView(0),
    54     mHidingView(0),
    55     mMainWindow(mainWindow)
    55     mMainWindow(mainWindow)
    56 {
    56 {
    57     // Do not defer this, it causes invalidation and updating.
    57     // Do not defer this, it causes invalidation and updating.
    58     setFocusPolicy(Qt::StrongFocus);
    58     setFocusPolicy(Qt::StrongFocus);
       
    59 
       
    60     setAcceptTouchEvents(true);
    59 }
    61 }
    60 
    62 
    61 QSizeF HbContentWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
    63 QSizeF HbContentWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
    62 {
    64 {
    63     Q_UNUSED(constraint);
    65     Q_UNUSED(constraint);
   282 {
   284 {
   283     if (event->type() == QEvent::Polish) {
   285     if (event->type() == QEvent::Polish) {
   284         // No need for any real polishing.
   286         // No need for any real polishing.
   285         static_cast<HbWidgetPrivate *>(d_ptr)->polished = true;
   287         static_cast<HbWidgetPrivate *>(d_ptr)->polished = true;
   286         return true;
   288         return true;
   287     }
   289     } else if (event->type() == QEvent::TouchBegin) {
       
   290         // Accept all touch begin events to get the full Begin..End sequence
       
   291         event->accept();
       
   292         return true;
       
   293     }
       
   294 
   288     return HbWidget::event(event);
   295     return HbWidget::event(event);
   289 }
   296 }