Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QScrollArea aligning QScrollBar
Tannz0rz last edited by Tannz0rz
I have a simple setup along these lines displaying a QHBoxLayout:
QHBoxLayout *hbox = new QHBoxLayout(); for(int i = 0; i < 50; ++i) hbox->addWidget(createLabel("test")); QWidget *hboxw = new QWidget(); hboxw->setLayout(hbox); QScrollArea *scrollarea = new QScrollArea(); scrollarea->setWidget(hboxw);
How can I set the QScrollBar to align above the QHBoxLayout, rather than on the bottom?
AFAIK, it's not possible without you reimplementing that part in Qt's source code. Note that you'll go against most platforms UI guidelines doing that.
Tannz0rz last edited by
@SGaist That's a shame. Thanks for the reply.