Answer the question
In order to leave comments, you need to log in
How to write a cross-platform GUI?
I need to somehow implement a cross-platform GUI for windows and Linux. I know python, some c, js, and just a little bit of assembler.
I heard that you can write on sharp, you can use qt or node js, and even on php (God forbid from these $) you can blurt it out. So, the question is: which of these is the most profitable? I mean both the convenience of writing code and performance. Enlighten the poor python developer who wrote without semicolons all his life))
Answer the question
In order to leave comments, you need to log in
Depends on the complexity of the GUI. If a simple interface is enough for regular edits, labels, buttons, comboboxes, etc., then you should choose the one that is closer to the language that you know better. If it's python (and you don't need much performance), then Tkinter is the best choice. If JS is React Native.
If the interface is more complex, then you should think about serious languages in this regard. C++, Delphi, C#, Java. With them, performance will be better and there will be more development tools (GUI).
Subjectively, I can tell you more about writing in Delphi, where there are pluses and minuses in Linux development. Of the major disadvantages - not all distributions are supported. Namely, some AstroLinux and ElementatyOS are not supported due to problems with the versions of GTK+ used there.
Also, the disadvantages include the fact that the development environment can only be installed under Windows.
Further, only pluses: fast development, no dependencies, the most powerful designer (of existing ones), native code, etc. Link to the framework platform ( https://www.fmxlinux.com/ )
And, despite popular belief, the language and development environment are developed and used. The latest version of the environment (and the language itself) was released in the second half of this year. There is a Community version for free use https://www.embarcadero.com/ru/products/delphi/starter
The most beneficial is what you know best.
If performance is important then take C++ or another compiled language. But it actually depends a lot on the task, somewhere python with php is enough. The GUI itself does not require much performance (if you are writing a regular application, not a toy at 120FPS).
You can use Qt in python and not get off your favorite horse.
I don’t know anything about python (but it seems cool), but the Qt framework is very interesting. But there the license asks to lay out the source on demand.
As a commercial developer, I have now become a supporter of proprietary binaries. Anything that is not binary = bad for me.
But I put everything open on the source on my computer, everything that is a black box = bad, dangerous: D
Well, since a pythonist, it will be easiest with some tkinter or pyqt.
If you look at other languages, then, IMHO, it will be most convenient on Sharp + Avalonia.
You can also look in the direction of flutter. Hemul GM
should also come here and advise Delphi - in principle, it’s also a good option, if you look at the advantages (compact binary, fairly mature tools, ecosystem)
Some other Electron and React native are quite convenient if you are familiar with the frontend.
C++:
GTK+ and QT ( BUT! there are bindings for many languages)
C#:
- GtkSharp,
- Avalonia, Xamarin/MAUI
- Unity (but few ready-made controls)
Delphi
RAD Studio
JS:
- Electron, React native
Python
- Tkinter
Another such thing appeared not so long ago - https://www.jetbrains.com/lp/compose/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question