[PyKDE] Custom interface
Greg Fortune
lists at gregfortune.com
Fri Jan 9 18:21:01 GMT 2004
Here's a 7 minute mockup using Designer. Making it look pretty is left as an
exercise to you :O) Remember, if you need pixel perfect (ie, inflexible)
layout, that is very possible. You just lose the ability for the app to
resize nicely. The .ui file can be opened in Qt Designer.
All the layout was done using QVBoxLayout and QGridLayout instead of trying to
pack it into a table or trying to draw the widgets myself on a QCanvas. For
custom borders, you might have to derive a QFrame and implement the border
drawing using that for the "choice" containers. FYI, QCanvas should probably
be considered a last resort and only used in a couple places where the
layouts and the standard widgets don't fit your needs. Drawing your own
widgets will be a *lot* more work :)
If you work up something a little closer to what you want, we can probably
offer advice for tweaking it.
Greg Fortune
Fortune Solutions
On Friday 09 January 2004 08:22 am, Eron Lloyd wrote:
> Hi all,
>
> I'm working on a major PyQt project implementing a complete open-source
> election system. One of my major challenges is developing a
> fully-functional on-screen ballot display widget, to present information to
> the voter and provide input methods to cast votes. I want the interface to
> be able to mirror a high-quality paper-ballot as much as possible, and
> therefore will probably have do extensive custom-widget work. My biggest
> concern is in the area of ballot layout; ballots usually take on a
> table-based interface, but I have a much different set of needs than QTable
> seems to provide. Attached is a mock-up of a sample ballot done in
> OpenOffice.org using their fantastic table support; this is more along the
> lines of my requirements, including cell/row spanning, custom borders,
> background/foreground/border colors, spacing/padding, and input areas. To
> my knowledge nothing similar to this exists, and I know KWord has been
> having major difficulties producing a good table class for documents. Any
> suggestions? I know Qt can probably do it but I'm not expert at all. I see
> some potential in QCanvas...
>
> Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ballot.png
Type: image/png
Size: 7098 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20040109/e711ae1d/ballot.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ballot.ui
Type: application/x-designer
Size: 14319 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20040109/e711ae1d/ballot.bin
More information about the PyQt
mailing list