Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QScroller does not work in QScrollArea in QDialog? ( It works fine in a QScrollArea under QMainWindow )
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 949 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    EdOfTheMountain
    wrote on last edited by
    #1

    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);
    

    }
    @

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved