Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

ScrollArea doesn't work.

$
0
0
Hello guys! I am developing an graphical application with Qt/C++ and i have to refactor my entire project to make my life easy. The problem that i have is, i believe, about the Layout type that i have defined at my mainWindow. Here follows the code: #include "dengueme.h" #include "ui_dengueme.h"   #include <QtGui>   DengueME::DengueME(QWidget *parent) :     QMainWindow(parent),     ui(new Ui::DengueME) {     ui->setupUi(this);       connect(this->ui->actionNew, SIGNAL(triggered()), this, SLOT(insertFrame())); }   DengueME::~DengueME() {     delete ui; }   void DengueME::insertFrame() {     Path *p = new Path();     Path *p2 = new Path();     Path *p3 = new Path();     Path *p4 = new Path();     Path *p5 = new Path();       QVBoxLayout *Layout = new QVBoxLayout;       Layout->addWidget(p);     Layout->addWidget(p2);     Layout->addWidget(p3);     Layout->addWidget(p4);     Layout->addWidget(p5);       this->ui->scrollArea->setLayout(Layout); } The Path class does not have any relevant code to the interface, because it is defined at Designer Form. This is what’s happening: I have called the same element repeatedly just to fill the scrollArea to test the scrollbar. [edit: updated for picture, koahnig]

Viewing all articles
Browse latest Browse all 18427

Trending Articles