PyQt, Qt, Windows and Linux

Discussion in 'Python' started by Vamsi Mudrageda, Nov 2, 2003.

  1. I am kind of new to Python, and after trying and using wxPython, I found
    it kind of lacking in easy-to-read documentation, speed at loading, and
    GUI response-time.

    So I am looking for an another GUI toolkit that is cross-platform for
    Python, and am leaning toward PyQt (PyGTK is kind of dull looking in
    comparison). Unfortunately, although TrollTech says Qt is
    cross-platform, its license strategy has me a bit confused. So here is
    to hoping someone can help...

    Objective:
    Develop/Write a program for personal use on my Linux using PyQt. Be
    able to also run it on Windows.

    Questions:
    1) Is it legally possible to do that?
    2) Do I need to buy a license from TrollTech?
    3) Can I create a .exe file for my windows on my Linux and copy it over?
    (I would like to develop the program entirely on Linux, but make
    executables for other platforms).

    Any help would be greatly appreciated. If you guys have another GUI
    toolkit for python, then please by all means...

    Thx.
     
    Vamsi Mudrageda, Nov 2, 2003
    #1
    1. Advertisements

  2. Yes, or from one of Trolltech's licensed resellers of licenses. The
    cheapest way you can proceed, I believe, is to buy Blackadder, personal
    edition, from theKompany.com: it comes with personal-use licenses of
    PyQt and Qt for both Linux and Windows (I _think_ mac, too, but I don't
    know about that). I believe it currently costs US $70 .
    That's an issue for such tools as py2exe and McMillan's "installer"; at
    this time, I do not believe they support that "cross-packaging"
    functionality. However, you surely _can_ package things up with the
    distutils, e.g. into a .zip, and copy over and install that package
    on Windows; that may not be quite as smooth but it should work fine.
    In the approach I'd suggest you WOULD develop entirely on Linux, but
    the other platforms would first separately install Python and needed
    extensions, then install your specific program by unpacking the .zip
    and running "python setup.py install" -- not TOO bad, I think.


    Alex
     
    Alex Martelli, Nov 2, 2003
    #2
    1. Advertisements

  3. Yes - and a license for PyQt.
    That's a function of the different packaging packages available.

    Phil
     
    Phil Thompson, Nov 2, 2003
    #3
  4. No - not Mac.

    Phil
     
    Phil Thompson, Nov 2, 2003
    #4
  5. Vamsi Mudrageda

    Ken Godee Guest

    Maybe I'm missing something new here.........

    But as far as I know, you "DO NOT" need to buy a license
    from TrollTech or PyQt or buy anything to give it a try, as
    long as use is personal and not used in a commercial enviroment.
    The only thing is you would have to make do with the older
    ver.2.3(?) on windows and many do.

    Although I do think BlackAdder is a heck of a deal and would
    get you the newest versions for both win and linux.

    This is the kind of thing that can scare away someone who
    just wants to give it a try to see if they like it.
    Once they give it a try, they'll be hooked forever!!!

    If I'm wrong, someone let me know.

    Hands down, PyQt is the way to go!!!!!!
     
    Ken Godee, Nov 2, 2003
    #5
  6. Vamsi Mudrageda

    John J. Lee Guest

    [...]

    Yes: if (you're only using unix/linux) OR (you're happy to stick to Qt
    2.x AND you're non-commercial), you don't need a license. They were
    talking about using Qt 3 on Windows: in that case, you do need a
    license from both TT and Phil (ie. you need to buy BlackAdder, unless
    you want to spend large quantities of cash for no reason).


    John
     
    John J. Lee, Nov 2, 2003
    #6
  7. I'm doing that with the McMillan installer using wine on Linux and it
    works for me.

    Heike
     
    Heike C. Zimmerer, Nov 2, 2003
    #7
  8. Thx everyone.

    I was really surprised by all the quick responses.

    Ok, to sum up my understanding.

    I can freely develop and distribute python/pyqt/qt programs on my Linux,
    but I must make the program freely available, ie. GPLed. No problem there.

    On Windows however, I need to buy a license from TrollTech if I want to
    use their latest offerings (or I can explain my situation to them and
    let them decide) as they no longer offer the non-commercial license for
    Windows. Once I get the license, I can make executables that can run on
    other Windows w/o that user having to buy a license for qt or pyqt.

    Did I miss anything?

    The windows part is a little disappointing (I am a college student,
    can't really afford the licenses... tho BlackAdder looks good), and I
    hope TT will change something in the future. Qt looks great (according
    to KDE), and since my program is mainly for Linux, I guess I will head
    in that direction.

    Again, thx all.

    PS. I will also write my situation to TrollTech as they suggested in
    their "we no longer support the non-commercial license" webpage and
    report their response back here.
     
    Vamsi Mudrageda, Nov 2, 2003
    #8
  9. Trolltech no longer distribute the non-commercial version of Qt.

    I will look at providing an evaluation version of PyQt that works with the
    evaluation version of Qt.
    I can't disagree with that.

    Phil
     
    Phil Thompson, Nov 3, 2003
    #9
  10. Vamsi Mudrageda

    Brian Guest

    Note that according to the BlackAdder page at thecompany.com, you must
    purchase the business edition ($400, currently) if you want the right
    to distribute the run-time elements of it. I'm not sure if the OP
    only wanted to distribute an app for use on his own windows box, or
    distribute his application on the net for use by others.

    Trolltech's pricing strategy, for me, keeps me on wxWindows. Qt does
    seem like an excellent product, however.
     
    Brian, Nov 3, 2003
    #10
  11. I'm doing that with the McMillan installer using wine on Linux and it
    Could you explain how you are doing that? I tried to understand it, but
    it seems to be a little above me :(

    I already got Wine properly installed, so could you go from there.

    Thx,
    Vams
     
    Vamsi Mudrageda, Nov 7, 2003
    #11
  12. Vamsi Mudrageda

    Jim Guest

    Could someone please explain this to me. I am still a little confused. I am just about to buy
    BlackAdder but want to make sure it will suit my needs.

    The question I have is this; if I get the Personal Edition, I know I can't distribute the run-time
    elements commercially (sell my programs) but can I in distribute them in a non-commercial way?

    In other words, if I write a program, I would like to give it to a few of my friends and hence,
    would be distributing the runtime components. I don't sell my programs and neither are my friends.
    This is totally non-commercial. Do the runtime components come with BlackAdder Personal? Obviously,
    I don't completely understand what the Qt runtime components are.

    Programming is a hobby for me and I want to write Win32 GUI programs using PyQt but don't want to be
    the only one who can enjoy my programs. Specifically, I am writing a numberology program in Python
    that I wrote many years ago using VB6 and want to use PyQt and Qt for the GUI design. It seems that
    Qt is the only platform which uses Tab Widgets. I couldn't find anything like that in wxPython (I
    need multiple tabs) and Qt has a QTab Widget that works perfectly.

    Than you for the help. I really want to get BlackAdder but don't want to buy it just to be
    disappointed later.
     
    Jim, Nov 16, 2003
    #12
  13. No. Personal means personal to you.

    Phil
     
    Phil Thompson, Nov 16, 2003
    #13
  14. Vamsi Mudrageda

    Jim Guest

    Thanks for the info, Phil. Can you help me out a little more? Honestly, I have spent the last 3 days
    searching the Internet for an answer and can't seem figure this out.

    One person (I think is was someone from theKompany) said that there was no functional difference
    between the Personal Edition and the Business Edition but I think you just told me the opposite. If
    I buy the Personal Edition and use it to write my program, I won't have the capability to run that
    software on any other computer besides my own (personal to me) ... not even my wife's computer
    downstairs, i.e., so the runtime elements don't come with the Personal Edition - which makes it
    functionally different?

    theKompany web page says the Business Edition is "for commercial use." From my understanding,
    commercial means of or relating to commerce and commerce is buying and selling products and I'm not
    selling anything. This is really confusing. I want to honor whatever licence I buy but it doesn't
    seem reasonable that I would have to pay $400 so I can give my own program away freely.

    Thanks for the insight.
     
    Jim, Nov 16, 2003
    #14
  15. Vamsi Mudrageda

    Bryan Guest


    jim,

    i clicked on the screenshots at the wxPython website and just about every screenshot uses a tab widget and they all look
    really nice:
    http://www.wxpython.org/screenshots.php

    wxWindows/wxPython includes a wxNotepad which is belive is what you are calling a tab widget.

    wxPython has wxNotebook, wxNotebook event and wxNotebook Sizer classes. there's an nice example in the wxPython demo
    and the source code looks very easy to use. the look and feel is what you would expect on windows.

    here's a link to an alphabetical listing of the classes.
    http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin27.htm#classref

    bryan
     
    Bryan, Nov 17, 2003
    #15
  16. Vamsi Mudrageda

    Jim Guest

    Bryan,

    Thanks for pointing that out. I got Boa Constructor up and running and tried to find a Tab type
    widget similar to Qt's QTab Widget. I can't find one anywhere but, as you pointed out, there must be
    one somewhere because there are some in the sample code on their page.

    On the alphabetical listing of the classes page, I did find something called wxTabCtrl. It says that
    it represents a tab control, which manages multiple tabs. I guess I just need to figure out where to
    find it in Boa or some similar IDE.

    I would still prefer Qt and PyQt because it feels so comfortable to work with if I can ever get my
    questions answered.

    Thanks much, Jim
     
    Jim, Nov 17, 2003
    #16
  17. Jim wrote:
    ...
    I think the difference is legal (contractual), not technical: you do not
    have the _permission_ to copy runtime elements to other computers, even
    though you may have the physical ability to do so.

    Qt (all the way from Trolltech) is peculiar that way: if you want to
    distribute programs that run under Microsoft Windows, then you do need
    a commercial license (there are other variants such as the "academic"
    license, etc, but I don't think they apply here). Presumably the concept
    is that if people choose to pay for their operating systems, rather than
    supporting free ones, they may well pay for applications too.
    If you develop your Qt/PyQt applications with eric3 and distribute them
    as free software (GPL) then you do not need to pay anybody anything. If
    you distribute applications otherwise than under GPL, or distribute
    applications that run on Windows, then you do need to pay (purchase an
    appropriate license -- unless your case can be covered by an academic
    license or the like, I guess, but I don't know the details of that).

    If you use Blackadder for the development, you can still give away your
    sources (they are and remain your property); you just can't give away
    executables and libraries that are not your property and that you are
    not licensed to redistribute (such as those that come with Blackadder's
    Personal edition/license).

    Somebody's trying to develop a GPL version of Qt that runs under Windows
    (with cygwin, specifically for the purpose of using KDE on cygwin); if
    that effort matures (I don't know about its current status), then at
    least C++-coded applications running on Windows+cygwin, covered by GPL,
    and freely distributed, would become possible. If and when this happens,
    then for Python-coded applications to be distributable on the same terms
    you will only need a suitable GPL-licensed PyQt (or PyQt with some license
    that is at least GPL-compatible, of course).


    Alex
     
    Alex Martelli, Nov 17, 2003
    #17
  18. Vamsi Mudrageda

    email9898989 Guest

    Trolltech's pricing strategy, for me, keeps me on wxWindows. Qt does
    I agree.

    I guess the simplest explanation is that if you have anything to do
    with Windows or if you want to sell your software, you have to pay for
    TrollTech's Qt and PyQt (minimum $400 for BlackAdder).

    The only way it is free to use it is if you are developing on Linux,
    distributing only to Linux users, and not charging for your software.

    Here are some technical advantages to Qt/PyQt/PyKDE, but I can still
    wouldn't recommend it for Windows development:
    - QT Designer is a very nice intuitive visual GUI builder (form
    designer). You can progress from a simple prototype to a
    cross-platform app easily. You aren't forced to plan the layout in
    advance. Then again for most apps it is not hard to just do your
    layout in code.
    - The QT C++ API is better designed, although that doesn't mean it is
    better for Python development (both PyQt and WxPython are basically
    thin wrappers for the C++ Qt and wxWindows APIs). Performance or
    bug-wise I don't know that PyQt is better than wxPython on Windows.
    On Linux, wxPython uses GTK.
    - With KParts and KDE applications, you can embed other components
    (like a web browser or spreadsheet) into your own app, although PyKDE
    does not yet support this. You can do something similar in wxPython
    on Windows embedding ActiveX controls (such as Internet Explorer or
    Adobe Acrobat Viewer).
     
    email9898989, Nov 17, 2003
    #18
  19. Vamsi Mudrageda

    Jim Bublitz Guest

    Qt for Linux is GPL'd, so nothing prevents you from selling your
    software for Linux - you do have to provide source code though
    and can't charge for Qt/PyQt/etc.
    PyKDE has been able to import KParts for at least a year. PyKDE
    currently doesn't allow you to export (author) KParts in Python,
    although the ability to do this is essentially complete and
    mostly just needs to be integrated with the PyKDE distribution.
    Jim
     
    Jim Bublitz, Nov 17, 2003
    #19
  20.  
    Phil Thompson, Nov 17, 2003
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.