... or do more people have problems to lay out dialogs properly with Designer?
I struggled for about half an hour with the automatic alignment functions, and all I got was this cluttered dialog layout:
[image:2180 width=700 class=showonplanet align=center]
Instead of the five vertical lines you can see on this screenshot, there should be exactly two: One that aligns all the comboboxes in a vertical axis, and one that alignes all the "Other" buttons. For the upper ("Text") part, I couldn't align the buttons because the font selection widget is a single element - Designer does not recognise that this widget is actually made up of the same elements as the color selection (which I added manually). For the upper ("Text") and lower ("Background") part, I could not find a way to equally align them because there were element in between (a separator and a label) that did not allow a grouping of the two groups.
Another problem was this:
[image:2181 width=300 class=showonplanet align=center]
The "Transparency" slider depends on the state of the checkbox. When it's off, it is disabled. What I secretly wished was that designer would realise this parent-child relation and automagically align the child with the parent's label...
There are solutions to these problems, but they require waaay too much manual intervention - I guess I'm not the only one who is too lazy to fix this as the above described layout problems are quite common. Manual intervention is annoying, and additionally prone to errors. I wonder if anybody is interested in a workshop at aKademy for KDE4, where we try to identify common problems and document easy solutions (e.g. predefined spacer sizes, ...)?
Some comments
You can do a lot with designer as well now. Grid layout works just fine in most of cases, but you have to remember two things - there are spacers you have to use and different widgets have different size policies. You have to play with these.
And as already mentioned - you can do a lot more in Qt, just designer doesn't have support for it.
You misunderstood the post
Hiya.
your answer is very much a developer answering, apologizing for the applications inadequate state by proving that you are able to get the desired results. (well, not quite but ok). Sounds like an answer straight off the top-ten-developer-answers: "It works for me!"
The point here, which I fully agree with, is that its very much a part of the QtDesigner to make the result as easy to create as possible. And currently there are lots of improvements that its missing which are already available in competing products[1]
Designer currently feels very much like a work in progress to me where its promise of potential is significant, but its just not there yet.
1) I found this one some time ago; the flash movies are pretty interresting to look at:
http://www.netbeans.org/kb/articles/matisse.html#flash I hope its still the same movie since I can't check here; still no flash on x86-64...
Re: You misunderstood the post
Nope. I'm just pragmatic and trying to help - I think that we can do better regardless of the state of the application
.
About competing products - you can do the same with Qt grid layout in case of such trivial cases (see .ui files I pasted here). Problems are raised in more complex cases like inserting KFontRequester class into any layout. Whole idea of using sublayouts is applying different layout policies to the parts of dialog. KFontRequester is the layout itself - that is the problem. I'm not sure about solution though.
And note about align to the guidelines in competing products - I have seen it a lot in the past that these guidelines have absolute positions (XUL and OOo 1.x AFAIK for example) which is completely no-no. In translated environment elements can have completely different sizes from the ones in original (in English) dialog.
And some more comments
Quick attempt - http://hasso.linux.ee/stuff/to_ellen.ui ... better? And some more comments.
Even if designer would realise that kFontRequester is made up of some elements, it must not align elements in it according to grid anyway - kFontRequester has its own layout - HBox.
And about transparency setting ... I'm afraid that it's '"gui follows mind" is not implemented yet' issue
. I'd hate this if designer attempted to guess such things.
cross-layout alignment
> Even if designer would realise that kFontRequester is made up of some elements, it must not align elements
> in it according to grid anyway - kFontRequester has its own layout - HBox.
Actually, the hbox is just an implementation detail. And the desired result of aligning the element really is a big improvement.
If, as you say, designer should not do it using a grid layout, then what method should be used to get the required result of better layouting?
akademy
... maybe you can show me how you usually work with designer at akademy?
Post the file!
Post the .ui file somewhere so that people can take a look at it!
voila
hehe, not exactly the one in the screenshot, but maybe you can help me with this one?
http://ellen.reitmayr.net/downloads/colorsettings-konqueror-el.ui
How can I manage to make the options below radio buttons (e.g. "Color" for Background color) be aligned with the label of the radio button, not with the radio button itself? Using a spacer always moves it way to far to the right.
then, the font display is too high. How can it be the same hight as the button? That worked in the other ui file, but then I had to use many more nested layouts which also wasn't optimal... :-|
A Qt 4 solution
OK, so you were using Qt Designer from Qt 3. I managed to get something like what you want, but I used Qt 4's Designer instead.
http://www.boddie.org.uk/downloads/qt4-colorsettings-konqueror-el.ui
http://www.boddie.org.uk/downloads/qt4-colorsettings-konqueror-el.png
I don't think there's an easy way to align the labels with the labels used in radio buttons. You can find out the offset using QStyle, though that technique isn't much use when you're working in Designer.
.ui
hi david,
thanks for your ui file - I'll look at the ui file as soon as I have installed Qt 4 Designer!