QScrollArea Not Expanding QCreate
-
Hello! I have a Scroll Area that I have filled with some random widgets. The QScrollArea has a grid layout and when I resize the application these are my results:
(When Enlarged)
(When Squished Side ways)
I am using QCreator and am unsure as to why the QScrollArea is not operating like it should, it operates like it should when squished sideways, but not vertically?
-
Hi,
@cdecde57 said in QScrollArea Not Expanding QCreate:
QScrollArea has a grid layout
That's your issue, that layout should be on a widget that you set on your QScrollArea.
-
You're welcome !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button or the three doted menu beside the answer you deem correct so that other forum users may know a solution has been found :-)
-
I went and added a handful of buttons that are inside of a layout. I placed this layout into the scroll area, but it does not scroll.
Ive already tried looking it up and I think I am doing what they want, but it does not work some reason?
-
As I already wrote, do not put a layout on the QScrollArea. That's not the way to use it.
-
Sorry I do not. I usually build my interfaces through code which might be easier in your case if you have to add lots of widgets to your area.
-
@SGaist Sorry for the long reply, I was afk. What you said worked! Really need to watch those layouts, gotta set the QScrollArea to have a QWidget in it, that widget gets the main layout you want and it expands as you need.Thank you for your help and time!