QScroller does not work in QScrollArea in QDialog? ( It works fine in a QScrollArea under QMainWindow )



  • I have been struggling with this for days. QScroller works fine on Android for QScrollAreas and QTableWidgets contained in a QMainWindow.

    Why would it not work on a QScrollArea contained in a QDialog? Modal or not it does not work.

    Thanks for any ideas,

    -Ed
    Qt 5.4 Beta1
    OS X 10.9.5
    Android

    @
    /// This works fine for both QScrollAreas and QTableWidgets contained in a QStackedWidget under a QMainWindow
    /// The same code operating on a QScrollArea contained in a QDialog does not work?
    /// modal or not-modal does not work?
    void FormApplicationSettings::setupKineticScrolling(QScrollArea *scrollArea)
    {
    QScroller::grabGesture(scrollArea->viewport(),
    QScroller::LeftMouseButtonGesture);

    // Adjust OvershootPolicy so it does not look wobbly, like table not attached to widget
    QScrollerProperties properties = QScroller::scroller(scrollArea)->scrollerProperties();
    QVariant overshootPolicy =
            QVariant::fromValue<QScrollerProperties::OvershootPolicy>
            (QScrollerProperties::OvershootAlwaysOff);
    properties.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy,
                               overshootPolicy);
    properties.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy,
                               overshootPolicy);
    QScroller::scroller(scrollArea)->setScrollerProperties(properties);
    

    }
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.