Minority Opinions

Not everyone can be mainstream, after all.

Lost in a sea of tools

leave a comment »

I’m writing my first significantly graphical program in a long time.  I’ve lost the game I wrote for System 7, never cared much about the Java applets that got me through a few college classes, and have found a new favorite language anyway, so I’m basically starting from scratch.

I’ve played with Tkinter and wxPython a time or two, but never enough to get something solid.  PyGTK could be good, but I would rather be more portable than less.  I’ve never heard any real recommendations for FxPy, and it appears to lack maintenance.  On the other hand, PyQt (and/or its near-clone PySide) are highly recommended.  In fact, the only major complaint I’ve heard was about the licensing, and that seems to have been resolved in recent versions.  The most compelling argument I’ve heard was that Qt makes C++ programming nice.

Getting started, the first thing I noticed was that it’s fairly easy to convince the designer to display something that looks reasonably similar to what I want.  The second thing was that I had no idea how to get any real data onto the screen.

There are several tutorials around, in either Python or C++, but it can take several tries to find one with the details I need.  Alternatively, I could look at the source code for a complete open-source application, but that leaves me feeling completely lost, since I lack the basic framework to understand what I’m looking at.  I’m trying to build a house from blueprints for sheds and tours of mansions.

That said, I think I’m slowly getting it.  I now have a tree structure just about ready for real data, using a real model-view architecture.  I even convinced the model to use DecorationRole for displaying a nice icon.  Now if I could just figure how to get the columns to resize when I open and close items, and convince the left arrow to go up a level when the selected item is already closed…

On the other hand, maybe I should make it do something useful first.

Advertisements

Written by eswald

21 Feb 2012 at 5:44 pm

Posted in Python, Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s