Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. touch-scrolling a custom widget and double-click
Forum Updated to NodeBB v4.3 + New Features

touch-scrolling a custom widget and double-click

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 921 Views 2 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.
  • X Offline
    X Offline
    Xaffeine
    wrote on last edited by
    #1

    I have developed a widget-based application that works well in linux and Windows. It mostly works in Android, too, but I haven't been able to get scrolling to work right.

    Most of my UI is inside a custom subclass of QWidget. This widget sits inside of a QScrollArea, which is also the central widget of my QMainWindow. I have a pointer variable, m_gridWidget, pointing to this custom widget. Some of the children of my gridWidget need to be double-clickable.

    To enable gesture-scrolling, I call QScroller::grabGesture, in a sequence like the following:
    m_gridWidget = new GridWidget;
    QScrollArea * scroller = dynamic_cast<QScrollArea *>( centralWidget() );
    scroller->setWidget( m_gridWidget );
    QScroller::grabGesture( centralWidget() );

    The grabGesture() does enable scrolling but it disables double-clicks on most of the children of the gridWidget. Interestingly, QLabels inside the gridWidget get to see clicks, but custom widgets inside the gridWidgets do not see double-clicks.

    How can I get this to work on Android? I am currently using QT 5.5 and testing on Android 5.0.2.

    1 Reply Last reply
    0
    • X Offline
      X Offline
      Xaffeine
      wrote on last edited by
      #2

      Would anyone like to recommend a better place to post this type of question?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        That might be a bug in the Android implementation. You can try asking on the Qt android development mailing list. You'll find there Qt Android port developers/maintainers (this forum is more user oriented)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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