misc:gui_frameworks_for_linux
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
misc:gui_frameworks_for_linux [2016/05/10 19:40] – mithat | misc:gui_frameworks_for_linux [2017/05/13 01:37] – mithat | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Python-centric ===== | ===== Python-centric ===== | ||
+ | |||
+ | ==== Tkinter ==== | ||
+ | |||
+ | <WRAP center round info 90%> | ||
+ | Perhaps OK for small, one-file utility apps | ||
+ | </ | ||
+ | |||
+ | Pros | ||
+ | * Comes out of the box with Python. | ||
+ | |||
+ | Cons | ||
+ | * Look and feel are a real buzzkill on Linux, possibly also on other platforms---even with themed widgets. The ugliness of menus is pretty much a deal killer | ||
+ | * No standard GUI builder, though a few 3rd party ones exist. | ||
+ | |||
+ | <file python tkdemo.py> | ||
+ | from tkinter import * | ||
+ | from tkinter import ttk | ||
+ | |||
+ | def do_nothing(): | ||
+ | print(' | ||
+ | |||
+ | root = Tk() | ||
+ | root.option_add(' | ||
+ | s=ttk.Style() | ||
+ | s.theme_use(' | ||
+ | |||
+ | # Menubar | ||
+ | menubar = Menu(root) | ||
+ | root.config(menu=menubar) | ||
+ | |||
+ | filemenu = Menu(menubar) | ||
+ | filemenu.add_command(label=' | ||
+ | filemenu.add_command(label=' | ||
+ | filemenu.add_separator() | ||
+ | filemenu.add_command(label=' | ||
+ | |||
+ | editmenu = Menu(menubar) | ||
+ | editmenu.add_command(label=' | ||
+ | editmenu.add_command(label=' | ||
+ | editmenu.add_command(label=' | ||
+ | |||
+ | menubar.add_cascade(label=' | ||
+ | menubar.add_cascade(label=' | ||
+ | |||
+ | # Toolbar | ||
+ | toolbar = ttk.Frame(root) | ||
+ | |||
+ | tb_foo = ttk.Button(toolbar, | ||
+ | tb_foo.pack(side=LEFT, | ||
+ | tb_bar = ttk.Button(toolbar, | ||
+ | tb_bar.pack(side=LEFT, | ||
+ | |||
+ | toolbar.pack(side=TOP, | ||
+ | |||
+ | # Status bar | ||
+ | status = ttk.Label(root, | ||
+ | status.pack(side=BOTTOM, | ||
+ | |||
+ | # Go! | ||
+ | root.mainloop() | ||
+ | </ | ||
==== PyGObject ==== | ==== PyGObject ==== | ||
+ | |||
+ | <WRAP center round info 90%> | ||
+ | Perhaps best option for Linux-centric apps---unless/ | ||
+ | </ | ||
+ | |||
+ | Replacing PyGTK. | ||
+ | |||
Pros | Pros | ||
+ | * Workflow (UI layout to code) is pleasant. | ||
* First-class Linux framework. | * First-class Linux framework. | ||
* LGPL | * LGPL | ||
Line 13: | Line 82: | ||
* Easy to install if using distro packages. | * Easy to install if using distro packages. | ||
- | Neutral? | + | Neutral/undecided |
* Event handling is simple event-> | * Event handling is simple event-> | ||
* Event names are specified as strings. | * Event names are specified as strings. | ||
Cons | Cons | ||
+ | * Poor support on other operating systems. | ||
* GTK3 is the future and it is built for GNOME. For other desktop environments, | * GTK3 is the future and it is built for GNOME. For other desktop environments, | ||
- | * Not supported well at all on other operating systems. | ||
- | |||
- | Thoughts | ||
- | * Workflow (UI layout to code) is pleasant. | ||
- | * Perhaps best option //right now// for Linux-centric apps. | ||
| | ||
- | ==== wxPython (Phoenix)=== | + | ==== wxPython (including |
+ | <WRAP center round info 90%> | ||
+ | Perhaps best option for multi-platform proprietary apps that have zero budget. | ||
+ | </ | ||
Pros | Pros | ||
* Liberal license. | * Liberal license. | ||
Line 32: | Line 101: | ||
Cons | Cons | ||
- | * Second-class Linux framework | + | |
- | * Awkward external | + | |
- | * wxFormBuilder generates .fbp files which are XML---but not really human readable. | + | * Wonky UI builder |
- | * Tiny bit awkward | + | * Requires third-party tools: |
+ | * wxFormBuilder | ||
+ | * wxGlade is incomplete. | ||
+ | * wxSmith is integrated with Code:: | ||
+ | * No UI file format results in slightly | ||
* Code seems awkward at times (perhaps it's only oddly named components) | * Code seems awkward at times (perhaps it's only oddly named components) | ||
- | Thoughts | + | Awkward points: |
- | * Perhaps best option for universal proprietary apps with no budget. | + | * In wxville, a Frame is a window, a Window is the mega-parent class, a Control is a widget. |
- | + | * Method names are CamelCase (first capitalized). | |
- | Notes | + | * Events: self.Bind(// |
- | * Awkward points: | + | |
- | * In wxville, a Frame is a window, a Window is the mega-parent class, a Control is a widget. | + | ==== PyQt ==== |
- | * Method names are CamelCase (first capitalized). | + | |
- | * Events: self.Bind(// | + | <WRAP center round info 90%> |
+ | Perhaps best option for multi-platform FOSS apps and for proprietary apps that have a $500 tools budget. | ||
+ | </ | ||
- | === PyQt === | ||
Pros | Pros | ||
+ | * First class Linux framework. | ||
* Excellent multiplatform support (except maybe non-GNOME GTK). | * Excellent multiplatform support (except maybe non-GNOME GTK). | ||
* Lots of components (including "we do it differently" | * Lots of components (including "we do it differently" | ||
Line 54: | Line 129: | ||
Cons: | Cons: | ||
- | * GPL-only | + | * GPL-only |
* Qt code can be heavy, somewhat verbose. | * Qt code can be heavy, somewhat verbose. | ||
- | * Possibly PITA to install if not using distro repos((qttools5-dev-tools will get standalone Qt Designer and other stuff.)) | + | * Possibly PITA to install if not using distro repos (which you want because it moves so fast).((on Debian, '' |
+ | |||
+ | ==== PySide ==== | ||
+ | |||
+ | <WRAP center round info 90%> | ||
+ | Abandonware? | ||
+ | </ | ||
- | Thoughts | + | Classic PySide was released in 2015 and works with Qt 4.8 framework. PySide2, which supports Qt5, is being developed, but it's not production ready, seems to be moving slowly, and doesn' |
- | * Perhaps best option for universal FOSS apps and proprietary apps that have a $500 tooling budget. | + | |
- | === Kivy === | + | ==== Kivy ==== |
- | Interesting, | + | <WRAP center round info 90%> |
+ | Not really a desktop application framework. | ||
+ | </ | ||
Pros | Pros | ||
* MIT license. | * MIT license. | ||
- | === libavg === | + | ==== libavg |
Needs research | Needs research | ||
Line 73: | Line 155: | ||
* LGPL | * LGPL | ||
- | === PyGui === | + | ==== PyGui ==== |
- | Wrappers | + | Is a wrapper |
misc/gui_frameworks_for_linux.txt · Last modified: 2017/05/29 19:28 by mithat