#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    325
    Rep Power
    12

    Anyone know an easy pyQT tutorial ?


    I'm trying to get my head around GUI development in python .. using pyQT. I'm finding the recomended tutorial (http://www.opendocspublishing.com/pyqt/) incredibly difficult and haven't found another one.

    Any good tutorials on GUI programming in python that any has actually used before.

    Also, does anyone know of a forum that is as active for python as this one is for php/mysql

    Cheers
  2. #2
  3. Wacky hack
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2001
    Location
    London, England
    Posts
    513
    Rep Power
    14
    I spent a long, long time looking, and I'm afraid I didn't find any! If you haven't already done so, I'd recommend trying to learn PyTk first, as it's easier to learn and there are more tutorials about for it. Once you get the hang of it, try moving over to PyQt, and it should make more sense.

    If you have, then first of all open Qt's designer program ("designer"), and open a .ui file in the source of another Qt-based program (most apps come with the .ui files, just search your hard drive for some), and have a look at how Qt works with its widgets, and also look at the slots and connections systems. Basically, you need to connect each action (like clicking on a button) to a slot, which will be the function you'll want to call on the event.

    Then it's just a matter of diving in! You can always have a look at my PyQt app, which isn't particularly complex: http://www.tomchance.uklinux.net/pro...quickrip.shtml
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    325
    Rep Power
    12
    Your examples are a huge help ... and incredibly well written

    We're learning python in one of my uni subjects and so will be taught *some* of the basics of pyQT, but not alot. But we will be starting it soon and so don't really have time to learn pyTK first.

    btw ... is pyTK as useful as pyQT or just simpler ?


    Basically, you need to connect each action (like clicking on a button) to a slot, which will be the function you'll want to call on the event.
    ahhhhhhh... that's what they mean by a slot.
    Why couldn't they just say that in the freakin tutorial !?!


    Then it's just a matter of diving in!
    Yea ... trying to, but getting a handle on the basics is needed and getting that seems to be a hurdle atm.

    Thanx for the help.
  6. #4
  7. Wacky hack
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2001
    Location
    London, England
    Posts
    513
    Rep Power
    14
    PyTk is pretty useful, but it's not as advanced ad PyQt, so yeah, easier to learn but not as fun or useful. Mind you, if you want to write an app that everyone can easily use, PyTk is great because it comes as standard with most Python distributions.

    Y'know I asked the author of that tutorial why he didn't explain things in a more simple fashion, and he (quite fairly) said: why don't you write your own? Well I'm far too busy with Uni and NewToLinux (url below), but if you wanted, you could always write an introductoy tutorial to help others like you when you're done
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    325
    Rep Power
    12
    if you wanted, you could always write an introductoy tutorial to help others like you when you're done
    yea .. wouln't mind doin it .. assuming I actually get a decent understanding of it eventually. starting seems a huge challenge in itself.

    Thanx for the info by the way

    oh .. and one other thing ... if i get used to pyQT, would pyTK be easy to learn after that ? or is that different altogether ?

    Cheers
  10. #6
  11. Wacky hack
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2001
    Location
    London, England
    Posts
    513
    Rep Power
    14
    It'd be much easier to learn than PyQt, because it's similar and also much more simple. But you will get infuriated having to hand code your GUI (as opposed to using designer qith Qt)

IMN logo majestic logo threadwatch logo seochat tools logo