PDA

View Full Version : Any good QT Designer LAYOUT tutorials?



Nyte
1st February 2013, 12:54
I've been reading this QT Layout documentation (http://doc.qt.digia.com/qt/designer-layouts.html) and watched various youtube video's on how to propperly use the layout functions of designer. But even if i do exactly the same steps as in a video, it goes wrong when i click one of the layout buttons and my UI instantly implodes in all directions.

So far, i haven't found any good tutorials on the subject. Can anyone recommend some good QT layout tuts?

Nyte
4th February 2013, 08:45
A weekend gone by and no answer... :(

Anyway, here's one of those tutorials i followed earlier:

http://www.youtube.com/watch?v=9E2KOphwZMg

It recreates a dialog box from Firefox. All goes well until 5:35, then everything goes completely different then shown in the video. I presume i have a more recent version of Qt Designer and that it doesn't exactly behave the same, but it doesn't make the learning process any easier.

wysota
4th February 2013, 09:09
The tutorial is fine (for a tutorial) and it doesn't matter whether you're using an older or newer version of Qt Designer. This is how it is with tutorials, if you don't understand how things work then even a minimal difference of your actions compared to the tutorial on an early stage grows and grows and becomes unfixable at some point. I don't know what is wrong in your case but considering that near 5:35 the tutorial shows that you can snap widgets to different cells (and spans) of a layout grid then probably the grid is wrong in your case.

I suggest that instead of looking for "tutorials", you just read the docs on how layouts work then launch Designer and start experimenting on your own by manipulating properties you had read about in the docs. You'll learn much more this way.

By the way, it is "Qt" and not "QT". The latter is a multimedia technology of the "fruit company".

Nyte
4th February 2013, 09:40
The problem with the documents are that they are either too basic (yes, i understand that if you press the grid button, everything will be put in a grid), or too advanced (complete with C functions and whatnot).

I'm a HTML/CSS webdesigner with a basic understanding of Javascript. I have little to zero knowledge of other programming language and I've noticed that if i have a problem with Qt, the answer usually involves changing something in the code.

Anyway, I've been experimenting with Qt Designer for a whole week, both on my job and at home, and i still have problem manipulating the elements on how i want them. So far the only workaround is to just absolute position everything (http://www.qtcentre.org/threads/53052-Fixed-QMainwindow-size-Layout-question?p=237644&highlight=#post237644), but i can't do that for long.

wysota
4th February 2013, 09:48
The problem with the documents are that they are either too basic (yes, i understand that if you press the grid button, everything will be put in a grid), or too advanced (complete with C functions and whatnot).
It's strange that you have an opinion on Qt's documentation if you haven't read it. Anyway, that's how it works -- you read the docs and then verify your knowlege with your own experiments. If you still don't understand something that you feel is important, you visit a forum such as this one and ask a specific question about it.


I'm a HTML/CSS webdesigner with a basic understanding of Javascript. I have little to zero knowledge of other programming language and I've noticed that if i have a problem with Qt, the answer usually involves changing something in the code.
Qt is about coding so you shouldn't be surprised :)


Anyway, I've been experimenting with Qt Designer for a whole week, both on my job and at home, and i still have problem manipulating the elements on how i want them. So far the only workaround is to just absolute position everything (http://www.qtcentre.org/threads/53052-Fixed-QMainwindow-size-Layout-question?p=237644&highlight=#post237644), but i can't do that for long.

I have no idea what problems you have so it is hard to suggest a solution. I never had to do any absolute positioning in Qt myself. Everything (well.. almost) can be done with proper understanding of layouts. Tutorials won't teach you that -- you'll only be able to repeat what was done in the tutorial. It's not creative, it's "recreative".

By the way, fixed positioning is not a solution. Try chainging your system font to a larger one and see how it messes up your UI.

Lesiok
4th February 2013, 09:52
Maybe show us a small picture what You want.