[PyKDE] Some fundamentals
tomchance at gmx.net
Tue Feb 25 01:16:01 GMT 2003
I've only just started out with PyQt, so please bear with me as I ask some
boring questions :)
I've been reading through the book "GUI Programming with Python: QT Edition"
by Boudewijn Rempt online (the paper copy is just too expensive for a poorly
student like me :-), and though it covers a lot of ground, it's written in a
very confusing order, jumping around between ideas. I'm getting a bit lost
trying to write a fairly simple application. When I'm confident enough, and
I've finished my PyGame tutorial, I'll try my hand at writing a PyQt tutorial
Anyway, enough rambling. I'm using Qt Designer to create my GUI, and I'm then
importing the class in my main program file. At the moment, the main program
file contains one class that inherits the GUI class, and that contains all my
functions. I'm sure this isn't the best way to do things - I'm used to
creating multiple classes, each one for a different task, and it seems a
little messy having all my function code in one class. What's the best way of
laying out the code?
Also, I'm struggling with connecting signals and slots. I understand the
principle, and I'm getting the hang of working wiht Qt Designer and my code
to create empty functions in Designer, and then create the actual functions
in my main code, but I don't really understand the signal parameter in a
E.g. I can guess what "pressed(QListViewItem*)" means? But why the
QListViewItem with an asterisk? And what really confuses me is the "int,
const Qstring&" stuff. What do they signify, and why are they in the signal
for a rightButtonClicked(), whilst clicked() has no parameters, and pressed
only has QListViewItem?
Back to the docs for now!
More information about the PyQt