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 with QStackedWIdgets does not work on stacked widgets
Qt 6.11 is out! See what's new in the release blog

QScroller with QStackedWIdgets does not work on stacked widgets

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 228 Views
  • 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.
  • S Offline
    S Offline
    sogo
    wrote on last edited by
    #1

    Hello,
    I have an application that has two stacked widgets with each page showing Image using QLabel and QScrollArea for scrolling during zoom. I added QScroller property to enable dragging during zoom in on both pages using this code:

    //QScroller::grabGesture(scrollArea_3->viewport(),QScroller::LeftMouseButtonGesture);
        QScroller::grabGesture(scrollArea->viewport(),QScroller::LeftMouseButtonGesture);
        QVariant OvershootPolicy = QVariant::fromValue<QScrollerProperties::OvershootPolicy>(QScrollerProperties::OvershootAlwaysOff);
        QScrollerProperties ScrollerProperties = QScroller::scroller(scrollArea->viewport())->scrollerProperties();
        ScrollerProperties.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, OvershootPolicy);
        ScrollerProperties.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy, OvershootPolicy);
        ScrollerProperties.setScrollMetric(QScrollerProperties::MaximumVelocity, 0);
        ScrollerProperties.setScrollMetric(QScrollerProperties::MinimumVelocity, 0);
        QScroller::scroller(scrollArea->viewport())->setScrollerProperties(ScrollerProperties);
       // QScroller::scroller(scrollArea_3->viewport())->setScrollerProperties(ScrollerProperties); 
    

    Presently I have commented out the scrollArea_3 as it does not work correctly work if I enable QScroller on both pages. If I enable both, then the scrollArea works fine but scrollArea_3 i.e. on other page does not register to mouse click over entire area of scrollArea_3 but only specific points like right most and down most margin.
    While searching on internet, I found this bug
    QTBUG-70681 which looks similar to my problem. I would just like to know if this is resolved or still persisting as this issue was opened on 2018 and status is still open and if there is any workaround to this issue. Thanks

    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