Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Scroll bar problems



  • Hey

    i ma developing an applicaqtion ofr a symbian device. i have set minimum size to all the widgets and ensured that they are all placed in a groupBox. But i am not able to get a clear layout, neither on device nor on simulator. Here is the code i am working with

    @
    QScrollArea *scrollArea = new QScrollArea;

    ui->centralWidget->adjustSize();
    QFormLayout *frmLout = new QFormLayout;
    frmLout->addWidget(ui->groupBox);
    frmLout->addWidget(ui->groupBox_2);
    frmLout->addWidget(ui->groupBox_3);
    frmLout->addWidget(ui->groupBox_4);
    frmLout->addWidget(ui->groupBox_5);
    frmLout->addWidget(ui->groupBox_6);
    frmLout->addWidget(ui->groupBox_7);
    scrollArea->widgetResize
    scrollArea->setLayout(frmLout);
    scrollArea->widgetResizable();
    QScrollBar *scrlBar = new QScrollBar;
    scrollArea->setVerticalScrollBar(scrlBar);
    setCentralWidget(scrollArea);
    

    @

    I need to add a scroll bar such that if the device is not able to display all the data on its screen, they can use the scrollBar. Kindly help.


Log in to reply