wxpython is a python's GUI package, relatively simple, and is cross-platform. wxPython is a package of mature cross-platform C ++ library of wxWidgets
In comparison, Tkinter (Python itself) ugly, PyQt too complex, relatively moderate wxPython
A simple interface application construction steps:
- Import module wx
- An object class defines the application
- Create a top-level window object wx.Frame class. Give the title structure and size parameters.
- Although other controls can be added to the Frame object, but can not manage their layout. Accordingly, the Panel object to a frame.
- Adding a static text object to display an arbitrary position 'Hello World' in the window.
- () Method of activating by a frame window show.
The simplest example
import wx app = wx.App() window = wx.Frame(None, title="wxPython 你好!", size=(400, 300)) panel = wx.Panel(window) label = wx.StaticText(panel, label="Hello World", pos=(100, 100)) window.Show(True) app.MainLoop()
wxFormBuilder
Build a visual interface tool that can automatically generate python code, save a lot of things there are wood
wxpython library
Guess you like
Origin blog.csdn.net/hxxjxw/article/details/105301121
Recommended
Ranking