QLayout
-
Hey
So, I am creating a mini project and I can't figure out how to use layouts.
I know only how to use layouts without a code:(with Qt Designer) and I want to learn how to use layouts manually with code :/. Maybe someone could
guide me for example how to make this kind of window(I attached photo) with layouts? Which kind of layout should I use and how many etc...? -
@privatepepper
If you say you know how to use layouts from Designer, why don't you look at the generatedui_...
file to see just what code gets generated fromuic
? -
@privatepepper
When you run the build, in your target directory (debug/release), where it puts the.o
/.obj
object files and the exe, for your filesomeclass.ui
it (theuic
program) generates a C++ file namedui_someclass.h
. Open that from Qt Creator and you can see the code which has been generated.Otherwise, the standard document to read is https://doc.qt.io/qt-5/layout.html. Take the time to read though. At the end there are several example programs about layouts.