Can you set border to QVBoxLayout
-
Most of my widgets on the application are placed on the Grid:
On one of the grid slots, I have placed vertical layout
verticalLayout_7
and within this layout I have multiple other horizontal layouts.Currently, my application looks like this:
My goal is to make a border around verticalLayout_7. This is just an example how I want this to look:
I would appreciate if someone could suggest a way to do this. Thanks in advance.
-
Most of my widgets on the application are placed on the Grid:
On one of the grid slots, I have placed vertical layout
verticalLayout_7
and within this layout I have multiple other horizontal layouts.Currently, my application looks like this:
My goal is to make a border around verticalLayout_7. This is just an example how I want this to look:
I would appreciate if someone could suggest a way to do this. Thanks in advance.
@lukutis222 Layouts are not widgets, so have no visual representation. But you can use for example QFrame if you need a border/frame around something.
-
@lukutis222 Layouts are not widgets, so have no visual representation. But you can use for example QFrame if you need a border/frame around something.
@jsulm
Would you be able to clarify how do I use the QFrame exactly? I assume you dont just drag and drop it on top of the vertical layout:
-
@jsulm
Would you be able to clarify how do I use the QFrame exactly? I assume you dont just drag and drop it on top of the vertical layout:
@lukutis222 said in Can you set border to QVBoxLayout:
how do I use the QFrame exactly?
Like any other widget. Put it in the layout where you currently have those widgets you want to have a border around them. Then and a layout to this frame and add those widgets to this layout.
-
@lukutis222 said in Can you set border to QVBoxLayout:
how do I use the QFrame exactly?
Like any other widget. Put it in the layout where you currently have those widgets you want to have a border around them. Then and a layout to this frame and add those widgets to this layout.
@jsulm I dont believe that works for me.
I have placed the frame on my layout:
but I cannot put anything inside a frame. It seems like it is disabled. Any clues why that might be the case ?
-
@jsulm I dont believe that works for me.
I have placed the frame on my layout:
but I cannot put anything inside a frame. It seems like it is disabled. Any clues why that might be the case ?
@lukutis222 said in Can you set border to QVBoxLayout:
It seems like it is disabled
Where? It works just fine for me.
-
@lukutis222 said in Can you set border to QVBoxLayout:
It seems like it is disabled
Where? It works just fine for me.
You are right. I can place the widgets in the QFrame. I also had to ensure the widget is set to Vertical layout:
Result: