Unsolved Find out when a QScrollArea scrollbar is shown
I need to resize content inside a
QScrollAreawhen the scrollbar is being shown due to
ScrollBarAsNeededpolicy, but there are no show or hide signals for
QWidgetnor did i find anything useful in
What would be the procedure to do something like that ?
Kent-Dorfman last edited by
Just thinking out loud, but what happens when you compare the size of the frame contained in the QScrollArea with the size of the QScrollArea itself? Does the child frame size() return its real size, or the visible size within the ScollArea? Test it and see...
If its visible, this seems to return the status fine
qDebug() << "is there : " << ui->scrollArea->verticalScrollBar()->isVisible();
@mrjj I know i can test if it is visible, but it is not what i need here, i need to know when it become visible, to modify the values of some of the
QWidgeti have inside.
@Kent-Dorfman That is not an issue here, i can calculate the size of the area inside fine (that is already what i am doing), my problem is that sometimes there are no scrolbar and sometimes there is, when i calculate the size of my
QWidgetwhich is relative to the size of the inside area, i do it when i insert it, but by that point, the scrollbar is not there yet if it were to be.
What i need is some kind of event that triggers when the scrollbar appears, so i can re-calculate everything.