Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. ScrollArea with a gridLayout inside not scrolling
Qt 6.12 LTS is out! See what's new in the release blog

ScrollArea with a gridLayout inside not scrolling

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 685 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.
  • K Offline
    K Offline
    Kris Revi
    wrote on last edited by
    #1

    15e9574f-2ba0-4a11-a79c-64a3e6587ddd-image.png

    code to populate it

        filemanager FileManager;
    
        QStringList test = FileManager.openDir(":/image/palettes/");
        int cc=0;
        for (QString &s : test)
        {
            QPushButton *button = new QPushButton;
            button->setObjectName("DeviceButton" + QString::number(cc++));
            button->setMinimumHeight(45);
            button->setMaximumHeight(45);
            button->setCursor(Qt::PointingHandCursor);
    
            button->setStyleSheet("border-image: url("+s+") 0 0 0 0 stretch stretch;");
            connect(button, &QPushButton::clicked, [=]() { sendBinary("paletteActive", cc); });
            ui->gridLayoutPaletteContent->addWidget(button);
        }
    

    when running this on my android tablet i can't scroll by just touching, hold and drag on the screen, i have to do it on the scrollbar to the right!

    how do i fix this?

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

      Hi,

      From the top of my head, I would say you need to check QGestureRecognizer.

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

      K 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        From the top of my head, I would say you need to check QGestureRecognizer.

        K Offline
        K Offline
        Kris Revi
        wrote on last edited by
        #3

        @SGaist i'll check that out!

        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
        • Unsolved