[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Window sizing/layout
From:       Waldo Bastian <bastian () kde ! org>
Date:       2002-09-25 18:49:22
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 25 September 2002 11:24 am, Jay Cornwall wrote:
> Hi
>
> I'm having a few problems getting the window layout of my KDE application
> (Kiowa) right, and hoped some of you might be able to shed some light on
> this.
>
> I have a KDialog in my program which displays fine normally. An example
> screenshot is:
>   http://www.evilrealms.net/misc/statistics-1.png
>
> The problem arose when I tried it with a translation, using longer strings
> for the tabs at the top. Ideally the window would expand to allow for the
> longer strings, but instead it does this:
>   http://www.evilrealms.net/misc/statistics-3.png
>
> This is quite inconvenient for the user, and having a wider window is much
> more preferable (it's a fairly small dialog, anyway). But how can I control
> this from the application, and stop KDE from adding scroll arrows?
>
> If this was a KDE "feature" (saving screen space is good, I suppose), I
> guess it wouldn't be so bad. But try widening the listview columns, and see
> what happens:
>   http://www.evilrealms.net/misc/statistics-2.png
>
> No scrollbar, and the window becomes wider. Why is it different in this
> case?

It's indeed a little weird.

What happens is that the dialog sizes itself to accommodate the size required 
by the contents. Each widget informs the the surounding widget (and 
eventually the surrounding dialog) about the size that it wants to have by 
means of sizeHint() and minimumSizeHint(). 

Now, a listview determines it's sizeHint() from the size of its contents and 
the size of the column headers. So you see that when you make the column 
headers longer, the widget will become longer as well.

Unfortnately, a tabwidget determines its desired size solely on the contents 
of the various tabs but ignores the size required for the tab-titles. I'm 
inclined to see that as a bug in Qt.

Let's mail the Trolls about this and see what they have to say on this in 
their defense :-)

Cheers,
Waldo
- -- 
bastian@kde.org  |   SuSE Labs KDE Developer  |  bastian@suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9kgUyN4pvrENfboIRAp3DAJ0TNLesLdeYixLQZE2EKQ6xdKqxrACeO4VY
BicJkE3ZtzP7EaFv+uPrJvs=
=fiGs
-----END PGP SIGNATURE-----


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic