Adding ScrollArea to the flowLayout
Unsolved
General and Desktop
-
Hi All ,
I have got an array of buttons as below :
{ FlowLayout *flowLayout = new FlowLayout(this); int n=20; QVector <QPushButton *> buttons(n); for (int ii=0;ii<n;ii++) { QPushButton * pb = new QPushButton(); // creating buttons pb->setMinimumSize(200,200); buttons.push_back(pb); // adding buttons to qvector flowLayout->addWidget(pb); } this->show(); }
How can I add scrollArea to this view as the bottom of some of the buttons are clipped off?
-
@Swati777999 Isn't this already discussed here: https://forum.qt.io/topic/132782/syntax-for-vector-of-qpushbuttons-added-to-flowlayout ?
-
@jsulm said in Adding ScrollArea to the flowLayout:
@Swati777999 Isn't this already discussed here: https://forum.qt.io/topic/132782/syntax-for-vector-of-qpushbuttons-added-to-flowlayout ?
Yes, but since the above question has taken a different turn, so I thought of asking it from a different solution, different from my design.