Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python + QT, Windows Forms or Swing for a cross-platform application?

Tags:

People also ask

Is Python Qt cross-platform?

Python is a cross-platform, interpreted, object-oriented programming language that is perfectly suited for Rapid Application Development, scripting, and connecting existing components together. Python uses a simple, easy to learn syntax, which focuses on readability to reduce the overall cost of program maintenance.

Are Windows Forms cross-platform?

It is released under the MIT License. With this release, Windows Forms has become available for projects targeting the . NET Core framework. However, the framework is still available only on the Windows platform, and Mono's incomplete implementation of Windows Forms remains the only cross-platform implementation.

Can PyQt be used for mobile app development?

PyQT is a library that enables developers to use Python to develop apps on multiple platforms such as Android, iOS, etc. PyQT supports both QML and Python for developing mobile apps. PyQT is a very powerful tool for mobile app development and offers many benefits such as: A wide range of supported platforms.

Is KIVY better than Qt?

In this article, we conclude that there is no much difference in Kivy or PyQt when speaking about working on GUI in Python, but they both are frameworks that work on different applications such Kivy is much better for mobile apps and other multi-touch apps than desktop apps, whereas PyQt is much better for desktop apps ...


I'd like to develop a small/medium-size cross-platform application (including GUI).

My background: mostly web applications with MVC architectures, both Python (Pylons + SqlAlchemy) and Java (know the language well, but don't like it that much). I also know some C#. So far, I have no GUI programming experience (neither Windows Forms, Swing nor QT).

I plan to use SQLite for data storage: It seems to be a nice cross-platform solution and has some powerful features (e.g. full text search, which SQL Server Compact lacks).

I have done some research and these are my favorite options:

1) QT, Python (PyQT or PySide), and SQLAlchemy

pros:

  • Python the language
  • open source is strong in the Python world (lots of libraries and users)
  • SQLAlchemy: A fantastic way to interact with a DB and incredibly well documented!

cons:

  • compilation, distribution and deployment more difficult?
  • no QT experience
  • QT Designer not as nice as the Visual Studio Winforms designer

2) .NET/Mono, Windows Forms, C#, (Fluent) NHibernate, System.Data.SQLite

pros:

  • C# (I like it, especially compared to Java and would like to get more experience in it)
  • The Winforms GUI designer in Visual Studio seems really slick
  • IntelliSense
  • ClickOnce Deployment(?)
  • Windows Forms look and feel good on Windows

cons:

  • (Fluent) NHibernate far less documented than SQLAlchemy; also annoying: Fluent docs refer to NHibernate docs which refer to Hibernate (aargh!). But plain NHibernate + XML does not look very comfortable.
  • Windows Forms will not look + behave native on Linux/Mac OS (correct?)
  • fewer open source libraries in the .NET world, fewer OSS users, less documentation in general
  • no WinForms and NHibernate experience

3) JVM, Java + Jython, Swing, SQLAlchemy
(I'm emotionally biased against this one, but listed for completeness sake)

pros:

  • JVM/Swing work well as cross-platform basis
  • Jython
  • SQLAlchemy
  • lots of open source libraries

cons:

  • Swing seems ugly and difficult to layout
  • lacks a good GUI designer
  • Guessing that I won't be able to avoid Java for UI stuff
  • Not sure how stable the Jython/Java integration is

(Options that I have ruled out... just to avoid discussion on these):
- wxWidgets/wxPython (now that QT is LGPLed)
- GTK/PyGTK

The look and feel of the final application is very important to me. The above technology stacks are very different (PyQT, .NET WinForms, JVM Swing) and require some time to get proficient, so:

Which alternative would you recommend and why?