GUIs - A Modest Proposal

Michael Torrie torriem at gmail.com
Sun Jun 13 11:43:12 EDT 2010


On 06/13/2010 05:29 AM, lkcl wrote:
>  really?  drat.  i could have done with knowing that at the time.
> hmmm, perhaps i will return to the pyqt4 port after all.

We're now wandering well off-topic here, but then again this thread was
never really on any particular topic.

I have to say I'm really confused as to your issues with GTK and Qt.
I've seen and done all kinds of fancy widget layouts in Qt and have
*never* had to subclass layout.  If you think you need to subclass
QLayout, most of the time you're doing it wrong.  You are familiar with
how the vertical and horizontal layouts and spacers work in Qt, aren't
you?  Sometimes you need a grid for a table or the specialized form
grid.   But other than that you want a dynamically-sizing layouts most
of the time.  And Qt's Vertical and Horizontal layouts do that.

I'm also confused by your claim that GTK lacks the layout widgets you
need as well.  GTK has the GtkHBox layout class which acts much like
your <span> tag.  Anything to pack in the hbox is automatically layed
out in a dynamicially-resizing way.  Any GTK dialog or window is a
combination of different layouts, nested to get the desired layout.
Works extremely well.

>  excellent!  that actually makes it worthwhile carrying on.  the only
> other thing that needs solving is that RichText is forced to have its
> width and height set.  but it mayyy be possible to create an
> appropriate QLayout derivative: i'll have to see.

Again I'm confused here.  I just created a little Window in Qt Designer
and was able to get my RichText (There isn't a "Rich Text" widget in Qt;
Just TextEdit with Rich text enabled) widget to resize automatically
just fine as I resized the window.  I'm obviously missing something.






More information about the Python-list mailing list