GUIs - A Modest Proposal
Jeremy Sanders
jeremy+complangpython at jeremysanders.net
Sun Jun 13 05:01:40 EDT 2010
lkcl wrote:
> * in neither gtk nor qt does there exist an "auto-layout" widget
> that's equivalent to putting some <span /> DOM objects into a <div />,
> to "flow" widgets that wrap around. yes, you can put words into a
> Label and get them to flow, but not _widgets_.
I'm pretty sure in PyQt4 that you can derive your own layout class from
QLayout to get what you want. No C++ is required. You can easily extend PyQt
without using C++.
There is even an example in the PyQt examples which does something similar
to what you want: see examples/layouts/flowlayout.py
Personally I find the Qt layout to be much better than anything provided by
CSS and HTML. Personally I'd rather be writing complex C++ templates that
those, though it does give you a feeling of achievement when you get what
you want with CSS.
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
More information about the Python-list
mailing list