QScrollArea *scrollArea = new QScrollArea();
qDebug() << scrollArea->verticalScrollBar()->geometry();
output:
QRect(0,0 100x30)
I debugged this at the end of mainwindow constructor where the widget with this scrollarea and scrollbar inside is already shown. So why it does not have the right geometry?
The QRect data is clearly wrong.
Must be a bug right?
Or does the scrollbar depend on OS and Qt has no data about it and debugs sizehint or something?
edit: seems like nothing is working for these returned QScrollbars of the function, even isVisible() returns always false.
Bookmarks