Cross-platform gui toolkit for deploying Python applications

后端 未结 5 850
情深已故
情深已故 2020-11-30 17:46

Building on: http://www.reddit.com/r/Python/comments/7v5ra/whats_your_favorite_gui_toolkit_and_why/

Merits:

1 - ease of design / integration - learning curve

5条回答
  •  清歌不尽
    2020-11-30 18:40

    I would definitely appreciate it if anyone knows of something better than what's commonly discussed; I see to have headaches finding something appropriate...

    Qt is great, but PyQt doesn't seem to have the same development resources. It seems to have some clever way to generate bindings, but isn't complete (e.g. PyKDE terminal kpart) and there is a dearth of documentation (as the developers admit). Compatibility with Qt's UI designer is nice.

    wxpython - controls aren't as nice looking, widget library isn't as large as KDE.

    OpenGL - doesn't even support fonts by default... pygame is okay, but opengl being a state machine is too annoying (object oriented models prevent making the a call in the wrong state).

    XUL - neat idea, I wish it worked. The pyxulrunner tutorial didn't work for me, though -- first I had to add the xulrunner /usr/lib path to LD_LIBRARY_PATH, then it still had problems with "from xpcom import components"...

    my wishlist for a ui library would be

    • Python integration (i.e. uses builtins like unicode, modules like threading, and language features like closures)
    • good intermediate representation (like XUL instead of generating hundreds of lines looking like "listbox91.addChild(label28)")
    • simple mutlithreaded support (automatic locks or event posting so e.g. elt.setText can be called from any thread; let the designer manage locking with Python locks if necessary)
    • user-centric features as well - scripting of a sequence of UI events, ability to keybind anything (KDE has dcop, but afaik binding isn't done automatically by the UI library), and intercept events.
    • potential for a large, easy-to-contribute standard library.
    • documentation, though if the library was well designed and generated enough interest, this would be a given.

    In my experience, html is so much easier to get something good-looking up than UI libraries.

    edit - after working with PyQt 4 for a while, it gets the job done for simple UI's. I'm currently not developing for end users, so looks don't matter. The QTextBrowser is very useful for displaying basic HTML tables and generating HTML links.

提交回复
热议问题