login
v2
v1

jmoiron.net

PyQt corrections and notes

posted February15th, 2004 @ 13:29:00

- tags: development , python

- comments: 0

I mentioned that I hated having to install Eric3 in order to compile the *.ui files that QtDesigner creates. I did some exploration and realized that Eric3 used "pyuic" (PYthon User Interface Compiler), which, wouldn't you know it, comes standard with PyQt. There goes one huge complaint I had about the whole system as well as 3 packages. I find myself thinking that PyQt did it right, and that libglade should develop a python generator for the glade UI files.

A pitfall that I had was naming signal handlers I accidentally collided with the object's namespace for the actual objects I was handling. For instance, the "file -> new" button would be called "self.fileNewAction" (dislaimer: I don't like camel caps but many tools I'm using use them, so I will too for consistency), and I was trying to create a function "self.fileNewAction()", which of course will work (and overload the old object instantly). This provides a problem when setting the signal handler, as you are setting a function to be the signal handler for what was an object but what is now simply the function. Oh No! I have to be careful and follow the naming conventions a little more closely.

Qt is pretty nice, and after you get over the stupidity issues with Qt designer (why are things static by default? this makes every application break on window size, and requires a good deal of forethought and action to fix!), the whole system is rather nice.

As a side thought, I wanted to create some kind of web-based developers journal, where I'd talk only about my coding (so that if I want to cross reference a solution to a problem I had, I can go to one section), but I actually think that this is that section, so expect more updates to be uncommentable until I completely redo the whole system (the way I did it now is retarded).

UPDATE: here's a screenshot of an extremely early version of "Pacman".. there is no functionality implied by the snapshot currently not implemented, but I'm probably going to muck up the screen a bit before I'm done.

comments