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. Scroll gesture difficulties.
Forum Updated to NodeBB v4.3 + New Features

Scroll gesture difficulties.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 346 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.
  • G Offline
    G Offline
    GrishaE
    wrote on last edited by GrishaE
    #1

    Hello! I have an issue with scrolling implementation. I`ve made this for Android device.

    1. Scrolling a bit sticking, and it doesn't work softly. 2. I`ve notice a big memory consumption. Help.
    QScrollArea* sa = new QScrollArea;                                       // Scroll pattern takes begin here
        sa->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
        sa->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
        QPixmap img2(":/description.jpg");
        auto wgt = new QWidget;
        QPalette pal;
        pal.setBrush(wgt->backgroundRole(), QBrush(img2));
        wgt->setPalette(pal);
     
        wgt->setAutoFillBackground(true);
        wgt->setFixedSize(img2.width(), img2.height());
        QScroller::grabGesture(sa->viewport(), QScroller::LeftMouseButtonGesture);
        sa->setWidgetResizable(true);
        sa->verticalScrollBar()->setSingleStep(1);
        sa->setWidget(wgt);
     
     
     
        //sa->setStyleSheet("QScrollArea {image: url(:/empty.png);}");
     
     
     
        tab->addTab(sa, QPixmap(":/Акаунт.png"), NULL);     // Передаем скролл на вторую вкладку
    
    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