Solved Some questions regarding visual components (widgets).
-
- I failed to find a component like SplitContainer in Visual Studio.
- I failed to find a Dock property that allows to a child component stretch with a parent component - left, right, all.
-
Regarding 2: you could have a look at https://forum.qt.io/topic/98549/qt-advanced-docking-system
Regards
-
@aha_1980 said in Some questions regarding visual components (widgets).:
Regarding 2: you could have a look at https://forum.qt.io/topic/98549/qt-advanced-docking-system
Regards
Thank you. How can I put this bunch of the code in my project? It says - Open the ads.pro with QtCreator and start the build, that's it. Then what? Do I get any dll? Another point - my app should run on Linux - it supports Ubuntu 19.10 and Kubuntu 18.04 and Kubuntu 19.10. But my app runs on Debian lower version.
-
Hi
What does a split container do ?
There is QSlitter that can divide a widget into 2 resizeable parts.
But since i dont know the VS version its hard to recommend how to get same effect. -
@mrjj said in Some questions regarding visual components (widgets).:
Hi
What does a split container do ?
There is QSlitter that can divide a widget into 2 resizeable parts.
But since i dont know the VS version its hard to recommend how to get same effect.It's like two panels separated with a line. If I move this line up/down - one panel grows and the other shrinks, and vice versa.
Can not say anything about QSlitter - I don't see it in the visual components tab. -
I'm shocked a little bit. I'm stuck at simple things, afraid to look further...
-
@jenya7
Hi
That really sounds like a QSplitter.
Try select 2 widgets and right-click, from the layout sub menu, you can choose a splitter.
That will place the selected widgets in a layout that allows resizing the 2 parts. -
@mrjj said in Some questions regarding visual components (widgets).:
@jenya7
Hi
That really sounds like a QSplitter.
Try select 2 widgets and right-click, from the layout sub menu, you can choose a splitter.
That will place the selected widgets in a layout that allows resizing the 2 parts.Thanks a lot. It works good. The same way should be option to dock components, shouldn't it? can not find...
-
@jenya7 said in Some questions regarding visual components (widgets).:
dock components,
Hi
What do you mean by that ?
The only dockable widges are DockWidgets that can both float as windows and be embedded
into a widget/form. However it can contain any other widget you want.Any widget can be embedded into any widget using layouts but im not sure if you mean that by
dock components ? -
@mrjj said in Some questions regarding visual components (widgets).:
@jenya7 said in Some questions regarding visual components (widgets).:
dock components,
Hi
What do you mean by that ?
The only dockable widges are DockWidgets that can both float as windows and be embedded
into a widget/form. However it can contain any other widget you want.Any widget can be embedded into any widget using layouts but im not sure if you mean that by
dock components ?I have a tabWidget on a MainWindow. When I resize the MainWindow, make it bigger, the tabWidget stays the same size, it looks ugly. I want it to stretch along with the MainWindow.
The same goes for the components on the tab - they should resize along with the tab.
-
Take a look at Qt Layout Management
-
@Christian-Ehrlicher said in Some questions regarding visual components (widgets).:
Take a look at Qt Layout Management
I think it refers to Qt Quick Application where I create the visual components in my program. In my case - Qt Widget Application - can't grasp it - how can apply this layout to my widgets I drag from the components tab?
-
@jenya7 said in Some questions regarding visual components (widgets).:
Qt Layout Management
Same. Please read about following the link provided by @mrjj
You can set layouts programmatically or do it via designer. Once everything is set properly you will get what you need (from the designer you can test using tools -> form editor -> preview. -
@jenya7 said in Some questions regarding visual components (widgets).:
I think it refers to Qt Quick Application
No, the link is correct for QtWidgets.
-
@artwaw said in Some questions regarding visual components (widgets).:
@jenya7 said in Some questions regarding visual components (widgets).:
Qt Layout Management
Same. Please read about following the link provided by @mrjj
You can set layouts programmatically or do it via designer. Once everything is set properly you will get what you need (from the designer you can test using tools -> form editor -> preview.How do I do it via designer?
-
-
-
@jenya7 said in Some questions regarding visual components (widgets).:
Thank you. It works.
So is your issue solved? Please don't forget to mark your post as such in that case.