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. Maybe bug in QScrollArea::setWidgetResizable(true)
Forum Updated to NodeBB v4.3 + New Features

Maybe bug in QScrollArea::setWidgetResizable(true)

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 3.6k 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.
  • V Offline
    V Offline
    vasylp
    wrote on last edited by
    #1

    Please check the following sample code:

    @
    #include <QApplication>
    #include <QVBoxLayout>
    #include <QPushButton>
    #include <QCheckBox>
    #include <QTextEdit>
    #include <QTabWidget>
    #include <QScrollArea>

    int main (int argc, char * argv[])
    {
    QApplication app(argc, argv);
    QTabWidget tab;
    QWidget* window = new QWidget;
    QVBoxLayout* layout = new QVBoxLayout(window);
    QPushButton* optsButton = new QPushButton("Options");
    QPushButton* exitButton = new QPushButton("Exit");
    QCheckBox* chkBox = new QCheckBox("Checkbox");
    QTextEdit* textEd1 = new QTextEdit;
    QTextEdit* textEd2 = new QTextEdit;
    layout->addWidget(textEd1);
    layout->addWidget(textEd2);
    layout->addWidget(chkBox);
    layout->addWidget(optsButton);
    layout->addWidget(exitButton);

    QObject::connect(exitButton, SIGNAL(clicked()), &app, SLOT(quit()));

    QScrollArea* scr = new QScrollArea;
    scr->setWidget(window);
    // scr->setWidgetResizable(true);

    tab.addTab(scr, "Tab1");
    #if defined(Q_WS_S60)
    tab.showMaximized();
    #else
    tab.show();
    #endif
    return app.exec();
    }
    @

    It creates the several text edits and buttons in the tab inside the scroll area widget. It works fine on s60v3 devices (I can move focus, select and insert text). But when I set 'QScrollArea::widgetResizable' to 'true', entire widget in the 'QScrollArea' doesn't response on cursor keys and doesn't allow editing.

    Both 'QScrollArea' and 'QTabWidget' works fine separately.

    This case is only reproducible on S60 v3 devices (I've reproduced it on E72, which is S60v3 FP2).

    Is this Qt bug, or maybe I did something wrong?

    -VP

    1 Reply Last reply
    0
    • D Offline
      D Offline
      danimo
      wrote on last edited by
      #2

      It works here using the simulator. Have you verified it on other Qt versions other than the device (i.e. Simulator or Desktop Qt)?

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vasylp
        wrote on last edited by
        #3

        Did you uncomment the 30th line? I tried to run this code on Simulator and observed the same result. I'm using 4.6.3 (the latest) version of Qt for Symbian.

        PS: just installed Nokia Qt SDK and on non touch devices I observed the same result - can't navigate between elements.

        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