views:

318

answers:

7

So a user suggested getting PyQT.

A quick Google gave me this: Link

Is this GUI Library for pay?

If my development environment is Ubuntu Linux, what should I download on that site. I have no idea.

Please provide links if the site I provided is not correct to what I need. Thank you.

A: 

Near the top of the page you will find:

Source Packages

This is the latest stable version of PyQt4.

PyQt-x11-gpl-4.6.2.tar.gz     Linux, UNIX source
PyQt-win-gpl-4.6.2.zip        Windows source
PyQt-mac-gpl-4.6.2.tar.gz     MacOS/X source

For Ubuntu, choose the first one.

Greg Hewgill
It says UNIX SOURCE. Do I have to compile it? Once I compile, then what? Does it produce an executable file for me to use the IDE with?
Sergio Tapia
Yes, you do have to compile it. There should be compile instructions included with the package after you untar it.
Greg Hewgill
+1  A: 

PyQT is released under multiple licenses: http://www.riverbankcomputing.co.uk/software/pyqt/license

You only need to pay if you don't want to release your product under the GPL.

PyQT isn't the only option for cross platform GUI in Python. There are many others too: http://wiki.python.org/moin/GuiProgramming

Mark Byers
+10  A: 

You may want to look at PySide which is sponsored by Nokia, who own QT. It's also LGPL, which is a bit better of a license than the PyQT bindings. It's also a bit more pythonic in how it works. Unfortunately, it's new, so there isn't as much documentation. On their download page you can find information about a PPA for Ubuntu which will make it so your bindings automatically stay up to date.

If you want to run PyQT then just use APT and install python-qt3 or python-qt4.

Pridkett
To clarify nokia bought Qt and released it under LGPL (essentailly free) a year ago, PyQT is still commercial, so Nokia are funding pySide which will be a free version of Qt for Python.
Martin Beckett
It's a little more complicated. Nokia bought TrollTech who made QT. They tried to work with RiverBank to get a better license for PyQT and RiverBank was unwilling to do it, so Nokia decided to start their own bindings. Good catch, however. It clears up some mission information in my post.
Pridkett
+3  A: 

I will answer the question you have stated in title

"Am I supposed to use PyQT4 for programming cross-platform software in Python?"

No.

You can use wxPython (http://www.wxpython.org/), it is a quite decent GUI toolkit base on wxWdigets and many commercial applications are written in wxPython e.g. www.mockupscreens.com

wxpython works on Mac/linux/Windows, has a very good support for custom widgets and provides a native looks on each platform, though you are free to design you own widgets/skins.

PyQT is comparable or may be in some cases better but costly for non GPL applications(http://qt.nokia.com/products/licensing), but wxPython is free as free beer (http://en.wikipedia.org/wiki/WxPython#License).

Anurag Uniyal
PyQt isn't made by Nokia, so your link is a bit misleading.
Parker
@Parker, that link is about Qt licensing, which is owned by Nokia.
Anurag Uniyal
A: 

In Ubuntu Linux, for PyQT try the package python-qt4.

An alternative is wxpython, and in Ubuntu the package is python-wxgtk2.8.

Another possibility to consider, that is considered an integral part of the Python distribution, is Tkinter, a Python interface to the Tk GUI toolkit. Tkinter is not necessarily considered as "good looking" as wxPython or PyQT, but it is definitely cross-platform, and has the blessing of being part of the Python distribution.

Craig McQueen
A: 

You should try pyQt and wxPython both, but You will know which one better when you release your program to public.

you can install wxpython with synaptic easily.

and here is helloworld for wxpython

import wx
app = wx.App()
frame = wx.Frame(None, wx.ID_ANY, "Hello World")
frame.Show(True)
app.MainLoop()

Just my 2 cents, Sorry, If you dont like to use it.

S.Mark
A: 

For cross-platform qt is the best option. GTK doesn't look well on windows, wxwidget/wxpython is ok but not so powerful and tkinter is too ugly/basic. Besides, qt4 is LGPL so you can link with it even if your application is not GPL.

Humberto Pinheiro