Click to See Complete Forum and Search --> : QT & Python help needed
As a refugee from M$, I'd like to try a bit of programming, with the familiarity of VB - so I settled on Python with the QT GUI. I'm running Mandrake 10, and you're perfectly entitled to tell me I'm trying to run before I can walk, but I've got QT3 Designer, and I think I've installed PyQt, and Python documentation, but I'm buggered if I can find it! Anyone care to walk me through binding QT to Python?
This is a re-post, as I evidently upset someone with the previous thread title. If his/her response is typical of the welcome I'm likely to find here, I may find myself agreeing with Groucho.
bwkaz
08-23-2004, 09:14 PM
VB?! :p
(I should talk -- I have to use it most days at work... blech. :D)
Anyway, I've never done any Python to Qt stuff, but I have used Qt 3, and I have used Python. (I don't have Qt installed now, though, so I can't check it out ATM.) First check to see that Python is there if you haven't -- just run python and type in some simple programs to run them. You should be able to hit ctrl-D to exit (or there should be an exit or quit command).
Then make sure Qt is installed, by running designer if you haven't. This should start up the Qt designer program. If it starts, Qt should be working as a library.
Then, it's just a matter of finding some documentation. For Python as a language, you can always check here:
http://docs.python.org/
and for Qt as a widget set, you can check here:
http://doc.trolltech.com/
though the latter link assumes C++, not Python.
I also found some PyQt documentation here:
http://www.river-bank.demon.co.uk/docs/pyqt/PyQt.html
though I don't know if you've seen that already or not...
Hmmm, maybe I am trying to run before I can walk. QT3 not the same as QT, eh? Came as part of the Mandrake 10 distro, as did Python and PyQt. Python I can access through Idle, but, like, I don't dig command-line programming.
I've done a bit of work with VB, having come to it via VBA (macros), and I find it understandable, enough like a real language, that I can get my tired old head around it.
I guess what I'm really after is a do this, then do that guide to getting this set up. The problem isn't the lack of documentation, it's finding the relevant bit!
bwkaz
08-24-2004, 07:23 PM
Originally posted by DroG
Hmmm, maybe I am trying to run before I can walk. QT3 not the same as QT, eh? No, they're the same thing. Qt is up to version 3 at the moment. I don't have any version of Qt installed. But I have written programs against Qt version 3 in the past (before upgrading my system and not installing Qt again).
Python I can access through Idle, but, like, I don't dig command-line programming. Then ... you might want to consider trying it out. When you learn a GUI (any GUI), you learn one way to do whatever it is that you're doing. That way of doing it will almost assuredly NOT apply on most other systems, sometimes even including new versions of your distro of choice. That depends on what you're doing though. I've never even seen Idle, so I don't know how it works, but it's very possible that the next version of it will work entirely differently -- and if you don't have a strong grasp on the basics of Python already, you'll be learning it all over again when you upgrade.
However, doing it via the command line will ALWAYS work, on any system that has the requisite tools (in this case, the Python interpreter) installed, and you can even do most of the same stuff on Windows if you install something like Cygwin and its version of Python. It's the difference between portability and being stuck with one system for eternity. ;)
I guess what I'm really after is a do this, then do that guide to getting this set up. Afraid I can't help you there, since I've never used PyQt. Sorry... :( Hopefully somebody else has used it before? If a day or two goes by and nobody else posts, bump this post (just reply to it with a "bump" message or similar, so I see it again) and I'll try to install it to see what the deal is. :)
Thanks, but I don't think I'd be justified in putting you to that much trouble. I obviously need to do a lot more homework before I start in on this.
With M$, I learnt by backing myself into corners, and then fighting my way out - the "If it ain't broke, fix it till it is" school of thought. This got me up to Comptia A+ certification, but the AEC aren't planning to run the Linux+ course. *Foo*
I have to keep reminding myself I'm starting over, back at the bottom, with Linux.
As for re-learning the app, VB6 > VB.net - by all accounts, totally different kettles of fish.
Thanks for your help, I'll sit quietly at the back, with my books for a bit now.:D