开发者

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

So a user suggested getting PyQT.

A quick Google gave me this: Link

Is this GUI Library for pay?

If my development e开发者_JS百科nvironment 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.


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.


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).


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


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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜