PyQt By Example (Session 5)
I am finally publishing my LatinoWare 2008 tutorial, in revised and expanded form. It will probably be a 10-part series, and here is session 5.
This session does heavy designer work, including promoted widgets, custom slots, and much more.
See also:
Hi, may I sugest a "session" argument?
Expand the designer adding a custom Widget.
Just to make an example... a matplotlib canvas.
ATM I need to add a "dummy" QWidget with the designer, then "substitute" it via code with a subclass of matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg
(look at http://matplotlib.svn.sourc... for an example WITHOUT the external .ui)
In fact, in session 5 that is there (sort of).
The editor widget is created in designer, but you can use anything that inherits qwidget in the same way, and do the "promotion" using designer, check the "Editor Widget" subsection.
yes, I was thinking about creating a custom QWidget and embed it directly into the Designer as in http://doc.trolltech.com/qq...
but rethinking... maybe it will be just a rewrite of that guide...
Yes, that guide looks good enough for me :-)
Hello Alsina
Is it possible for you teach PyQt Online to students.
I would like to learn from an experienced programmer.
Is it possible ?
@Ibn Saeed: no, sorry, I already have a job that takes all my time, so I can't really do that, at least not very well.
The best path right now is probably getting Mark Summerfield's book (http://www.qtrac.eu/pyqtboo... and subscribing to the PyQt mailing list for help.
I am on the list, too, and I try to help out when I can.
@Alsina,Thanks for replying.
I will read the book by Mark Summerfield.
I am not very familiar with Mailing Lists, i am more of a Forum person.
Do you know of anyone who teaches Python in an online university ?
You can access the PyQt mailing list more like a forum here:
http://www.nabble.com/PyQt-...
And while I don't know of anyone doing what you need, if he exists, he is in that list for sure ;-)
Thanks alsina, I will join the mailing list and give it a try.
Once again thanks for your help and please do create more tutorials for PyQt.
I think it would be a nice if you could start a series which would complete a full PyQt program.
You can go slow, showing the steps needed to write a working application. I think people would benefit more with this approach.
Just a suggestion
This series will end with a full working program. It may take a year, but it will ;-)
Thats excellent.
Alsina, i signed up at Nabble.
I posted a reply to one of the threads.
Here is what i received in my email:
=======
You are not allowed to post to this mailing list, and your message has
been automatically rejected. If you think that your messages are
being rejected in error, contact the mailing list owner at
pyqt-owner@riverbankcomputing.com.
==========
I think they dont allow the public to reply or post.
I think you may have to subscribe to the mailing list, too, but I am not sure.
Hi :)
I'm eagerly waiting lesson 6 :)
Have you thinked about a lesson to show "custom" data in the treeview?
In your example you have a date column for your task, but you enter a string in the QTreeWidgetItem;
The sorting by date, in the application, works... but just for an accident (str(date) return a "YYYY-MM-DD ... " string).
What about inserting (for example) numerical values? You will end up with the "notorius" natural sort order (http://www.codinghorror.com...
@ZeD yes, that is one of the mny bugs in session5's app :-)