PDA

View Full Version : Why don't QT Designer layouts "make sense to me"?



aplatypus
20th May 2010, 15:48
Hello hello hello ...

I kind of realise that the title of this thread is (potentially) somewhat provocative seeming. Good.

I've been doing forms, screens, html and gui programming for more than 20 years and until now, I thought I'd see all the ways someone could make a visual forms designer work. I've never until now seen a visual design tool that doesn't show or allow me to manipulate "flows" and "stacks" (or layouts). On _some_ level. :crying:

On a different topic someone mentioned that "ranting about" something would not get it fixed. That's kind of sad if one is working with a market(?) oriented organisation. It is a pretty cool answer if you are into totalitarian, hierarchical, fascist or (the most likely) STRESS-ed organisational structures. (Ah ha ... I'm not too dumb; I believe I 'get' the human dimension here).

Hence ... with higher education bits of toilet paper and 20 years experience with flows, stacks, swing and forms, (including HTML and CSS3) and layout design; 'WHY' do I find QT Designer layout user interface to be 'out of reach'? Are you targeting people with 120+ IQ-s?!!

The question is not about 'me' it is about making a new (and potentially valuable) technology USE-ful and ACCESS-ible for programmers. Sorry 'folk', if there is a time that I know there's a "challenge": with a HIE (http://en.wikipedia.org/wiki/User_experience) (human interface experience) for the tool I'm using.

When that tool is supposed to be SOLVING the problem ... Consider a base case study.


Window [QMainWindow]
QMenuBar
QWidget
QStatusBar


Actually I have a desired 'result' ... What bites me at this simple, basic level is why is QMainWindow _not_ a vertical layout? (Sorry if this seems esoteric to the support and design decision makers; And ...) If I can ...

If I can ... at least appreciate the issues involved here about stressed support people; that usually means 9 others are walking away. For me (dunno about others) I sense that Layouts are something like 'behaviours' added to a GUI (deliverable). Yes/No(??)

I have experimented -- It is easier to just write source code (C++ or Python) -- Who needs 'MOC' when the interface requires 3 hours to accomplish 30 min. editing?! (that's rhetorical) .

I doubt that the QT Designer intention was to make me design GUI-s with source code or with XML.

For 'me' just needs to functional and effective. For programming, no one needs QT to be 'special'. For some others who are not using QT Designer (I'll bet); they may want colours an gloss. What have these folk designed and implemented? Believe in skill (and not in your management, family or creditors).

Thanks for listening, salam ...

.W.

SixDegrees
20th May 2010, 16:00
Qt offers three basic layouts - horizontal, vertical, and grid. All are embeddable within one another.

If none of these or their combinations are sufficient, you can write your own.

The differences between this any any other layout management system (like Java's, for example) are trivial.

What is it that's difficult to understand?

JD2000
20th May 2010, 17:23
To be fair, I have seen numerous questions from people struggling with layouts, usually along the lines of 'why does my widget not resize when I expand the main window/container?'

They typically have not grasped the difference between associating a layout with a container and having it inside one.

The way QT Creator works does not help with this.

When editing a UI file I think that it is quite reasonable to assume that all you need to do is pick a layout from the list and drop it into the area you want a Layout Manager for. This ofcourse does not work as the layout itself never gets resized, only the container does....

wysota
20th May 2010, 22:33
Hence ... with higher education bits of toilet paper and 20 years experience with flows, stacks, swing and forms, (including HTML and CSS3) and layout design; 'WHY' do I find QT Designer layout user interface to be 'out of reach'?
The answer is very simple. You are just used to some other approach and if you have been using it for the last 10 years it's hard for you to switch to some other approach. You just expect Qt to work the same way other things you used work. Trust me, using layouts is trivial once you stop thinking about flows, stacks and other clever terms and just focus on what should be on the right side of what else and what components should grow if given such opportunity and which shouldn't. For standard Qt layouts this is enough.


Actually I have a desired 'result' ... What bites me at this simple, basic level is why is QMainWindow _not_ a vertical layout? (Sorry if this seems esoteric to the support and design decision makers; And ...) If I can ...
QMainWindow doesn't enforce any layout apart the fact that the menu bar is on the top of the window and the status bar is on the bottom of the window but if you don't like it, you can just subclass QWidget and put the status bar on top and the menu on the right :)

As for the layout of the contents (so called "central widget"), QMainWindow doesn't care - you can use any layout you want.


For me (dunno about others) I sense that Layouts are something like 'behaviours' added to a GUI (deliverable). Yes/No(??)
Not really. Size policies are more about behaviours. Layouts (at least the default ones) are mainly about relative position of objects.


I have experimented -- It is easier to just write source code (C++ or Python) -- Who needs 'MOC' when the interface requires 3 hours to accomplish 30 min. editing?! (that's rhetorical) .
Actually MOC has nothing to do with GUI, you probably meant UIC. But let's skip that and make a contest. I bet I can prepare a gui of your choice in Designer faster than you can implement it in hand written code. Of course I'm only talking about positioning objects and their behaviour when things such as window size, font size or language change and only using widgets that are accessible in Designer. Are you in?

If you have some specific problems with your GUI I'm sure you we help you push matters further.

ChrisW67
20th May 2010, 23:05
I hope you feel better now.

There were two questions you posed:

Why don't QT Designer layouts "make sense to me"?
Despite the time and effort you put into your post I think it remains really quite difficult to answer this question. It seems that you are expecting Qt to behave like some other tool you have used in the past and are unable to leave that baggage at the door.

You also seem to be labouring under the mistaken impression that QtCentre is some Nokia-funded support organisation.


why is QMainWindow _not_ a vertical layout?
The main widgets do not have a default layout because, and this might come as a shock to you, it is more flexible to allow the designer to chose the layout from among a set of options (SixDegrees points them out). If pressing a single toolbar icon in Designer (two clicks if you count selecting the window first) is too much effort to get your QMainWindow with vertical layout then you clearly need to use a tool other than Qt.

I've never until now seen a visual design tool that doesn't show or allow me to manipulate "flows" and "stacks" (or layouts). On _some_ level.
I really have _no_ idea what your issue is here. If an out-of-the-box set of layouts that you can apply to widgets, nest, and manipulate through a GUI designer and code is not adequate then I cannot help.

pixelpartner
12th November 2010, 14:15
I also feel the same as the original poster. Similar bio.
How can I tell the layout that manages my widgets properly in designer to be dynamically resized by the enclosing window ?

nroberts
12th November 2010, 18:08
Hence ... with higher education bits of toilet paper and 20 years experience with flows, stacks, swing and forms, (including HTML and CSS3) and layout design; 'WHY' do I find QT Designer layout user interface to be 'out of reach'? Are you targeting people with 120+ IQ-s?!!

BWAHAHAHAHAHAH!!!! 120???

I do have to admit to initially not understanding the designer, being more used to things like glade, but not understanding layouts??? And it took one run through the overview to get a handle on the designer. Like others say, it's simply that Qt seems to differentiate between a layout being 'in' a widget and being 'associated' with one. I don't see the use of such a distinction but it isn't hard to figure out.

So yeah, if your IQ is really < 120 maybe you'd be better off in the police force: http://www.brainbasedbusiness.com/2008/03/when_he_scored_125_on.html

Sorry, if you're going to complain that something as basic as layouts is set up for people that are too smart, you make yourself free game. 120 isn't even high. GWB was said to have that much.

ChrisW67
13th November 2010, 07:58
pixelpartner: Apply a layout to the main window; there are options in the right-click menu and buttons on the main Designer tool bar for doing this, and they become active when the main window (or main widget), i.e not a subordinate widget, is selected.

Open Qt Assistant, search for "quick start", open "A Quick Start to Qt Designer", read and work through the first two thirds of the article. For more read "Using Layouts in Qt Designer." If there is still something you don't understand then please ask.