After inspection, I found out that just the line
mScrollArea = new QScrollArea(this);
To copy to clipboard, switch view to plain text mode
automatically adds the mScrollArea widget to the main window (because of this pointer.
Ofcourse, its area dimensions needs to be specified which I did as:
mScrollArea
->setGeometry
(QRect(10,
10,
350,
190));
//set fixed (desired)
mScrollArea->setGeometry(QRect(10, 10, 350, 190)); //set fixed (desired)
To copy to clipboard, switch view to plain text mode
Therefore, I just initialised mScrollArea as:
mScrollArea = new QScrollArea;
To copy to clipboard, switch view to plain text mode
and then did:
layout->addWidget(mScrollArea);
layout->addWidget(widget2, 1);
layout->addWidget(mScrollArea);
layout->addWidget(widget2, 1);
To copy to clipboard, switch view to plain text mode
It still does not work! :-(
Please help
Bookmarks