Author Topic: Cross platform GUI development  (Read 24194 times)

0 Members and 2 Guests are viewing this topic.

Offline trevwhiteTopic starter

  • Frequent Contributor
  • **
  • Posts: 955
  • Country: gb
Cross platform GUI development
« on: November 26, 2014, 09:57:16 am »
HI

I keep putting it off or more to the point failing to conclude which is the best GUI based language to develop with. I really do not want to start some war about language A is better than language B, C and D because it will end up 100s of messages and I will be no closer to my answer I fear. I just want to get some people's thoughts on languages that do the job.

I want a cross platform GUI based language that has a decent looking GUI, is actively being maintained and has good books/support. I need to use it to communicate with serial ports and usb ports, etc. I did a bit of Android development previously and so have some experience with Java but am by no means any kind of expert. Some of the Python based GUIs seem to have stalled or not so supported. I do not want to put all my energy into learning a GUI and then find out its just not supported.

Anyone got a recommendation/links to information?

Thanks

Trev



 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30296
  • Country: nl
    • NCT Developments
Re: Cross platform GUI development
« Reply #1 on: November 26, 2014, 10:15:24 am »
I'm using C++ and Wxwidgets. If you want to start with Wxwidgets you do need to get the book 'cross platform programming with Wxwidgets'. About a decade ago I had the same question. Back then Qt wasn't free for use in commercial applications and the licensing model has changed several times since then. Wxwidgets has always allowed commercial applications. What I like about Wxwidgets is that it produces a pure native application for the platform so it doesn't look alien. Wxwidgets also abstracts a lot of OS stuff like threads, sockets, etc. And yes, there is a serial port class: look for Wxctb.
« Last Edit: November 26, 2014, 10:21:58 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline jancumps

  • Supporter
  • ****
  • Posts: 1273
  • Country: be
  • New Low
Re: Cross platform GUI development
« Reply #2 on: November 26, 2014, 10:45:09 am »
Do you have a wish list of the platforms that should be supported. Not all cross-platform solutions support all platforms.
That list will take care that you can already cross-out some of the options - makes your candidate list smaller and easier to choose from :).
 

Offline trevwhiteTopic starter

  • Frequent Contributor
  • **
  • Posts: 955
  • Country: gb
Re: Cross platform GUI development
« Reply #3 on: November 26, 2014, 10:53:56 am »
Thanks for the fast response, wxwidgets looks interesting.
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 508
  • Country: no
  • tinker - tinker, little noob.....
Re: Cross platform GUI development
« Reply #4 on: November 26, 2014, 07:24:12 pm »
Check out Embarcadero, they have several language options.
 

Offline Christopher

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: gb
Re: Cross platform GUI development
« Reply #5 on: November 26, 2014, 07:45:34 pm »
I use python with pygtk. Can use glade as an interface designer!

If its only running on windows I use c# visual studio 2010 as it is very simple to get stuff running quickly.
 

Offline hagster

  • Frequent Contributor
  • **
  • Posts: 394
Re: Cross platform GUI development
« Reply #6 on: November 26, 2014, 09:17:25 pm »
I'm planning to give Xamarin a go to do x platform dev in C#. The latest Visual Studio 2015 preview has a native android emulator which sounds useful.

I have also used phonegap in the past to make apps in HTML/javascript. It works well, but I hate js.
 

Offline The Chump

  • Contributor
  • Posts: 49
  • Country: gb
Re: Cross platform GUI development
« Reply #7 on: November 27, 2014, 12:48:56 am »
For those who remember Borland Delphi and have a soft spot for Pascal
http://www.lazarus.freepascal.org/
 

Offline lgbeno

  • Frequent Contributor
  • **
  • Posts: 355
  • Country: 00
Re: Cross platform GUI development
« Reply #8 on: November 27, 2014, 01:36:31 am »
I've used QT with Python before, it's pretty good.  Java also a standard option.  All the rage these days is using node.js and a framework like bootstrap to make web based UIs
 

Offline vvanders

  • Regular Contributor
  • *
  • Posts: 124
Re: Cross platform GUI development
« Reply #9 on: November 27, 2014, 02:18:57 am »
Qt and WxWidgets are the common one's. There's also Mono which lets you do WinForms but I've heard of mixed compatibility(although the tools/framework is hard to beat there).
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30296
  • Country: nl
    • NCT Developments
Re: Cross platform GUI development
« Reply #10 on: November 27, 2014, 02:30:15 am »
For those who remember Borland Delphi and have a soft spot for Pascal
http://www.lazarus.freepascal.org/
I remember but I wish I couldn't  |O Pascal is a terrible language for taking on big projects and Borland's inconsistent libraries and bolted on band-aid features to do C style programming didn't help much.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 10289
  • Country: gb
Re: Cross platform GUI development
« Reply #11 on: November 27, 2014, 02:55:16 am »
I think you need to define your list of important platforms. None of the cross platform toolkits work on every platform. Most focus on desktop environments. If small embedded platforms are important to you, you need to keep that clearly in mind as you choose. Don't accept vague statements about embedded support. Look carefully at how well they actually work on your important platforms. A number of toolkits have had a variety of platforms on their web pages for years, which have never received the love needed to be considered properly supported.
 

Offline Charles Creations

  • Contributor
  • Posts: 36
  • Country: us
Re: Cross platform GUI development
« Reply #12 on: November 27, 2014, 03:35:09 am »
I am using TKinter in python to create a USB interfacing application. I have had some difficulty finding good quality examples and information on Tkinter, but once I got over the hump, it became  much easier for me. Tkinter is included in the basic python download, so it makes it easy on a user side to get it up and running although pyserial is not included, so they need to install that  library.

Tkinter is by no means the only option, so I am interested to hear what others have to say. Anyone else using Tkinter?
Thanks,
Charlie
 

Offline metacollin

  • Contributor
  • Posts: 35
  • Country: us
  • Ocelloscopes. You know, for ocelots.
    • Electropimp
Re: Cross platform GUI development
« Reply #13 on: November 27, 2014, 08:44:53 am »
I emphatically recommend Qt.  It has many bindings, with C++ and python (via PyQt) to probably be the most common.  Qt is message driven, has a visual interface creator, and is easy to use and build.  It also looks pretty damn good on every platform, even OS X.  Message driven means someone does something to an interface element (like clicks it) and it creates a signal, and you have a method that gets called.  This is, to me, much more intuitive.

wxWidgets is event handler driven, you have a loop that is constantly checking on a giant state machine, and you write handlers for certain state changes.  This is outdated and dick chafe, to me anyway. Unless you want to script GUI elements using python (as in, embedding the python interpreter in your GUI program, I don't mean simply writing the program in python), steer clear of wx.  Wxwidgets was originally developed to be (and still is) very close to MFC.  MFC is short for Microsoft Foundation Classes. It's the clusterfuck of a Windows API that predates .NET.  There is a reason .NET was a completely new API that shared nothing with MFC, and that reason was because MFC was fucking terrible. 

Back when .NET was being transitioned to and tons of developers who had been using MFC for years found their entire knowledge base suddenly deprecated.  That's a pretty awful situation to find oneself in, so enter wxWidgets.  Unfortunately, it inherited a lot of the things that were bad about MFC because of this. 

Qt also is originally for use on dumb phones, and was created by Nokia.  It's now become a very polished, feature complete (while staying lightweight) solution that works on all platforms, including mobile look-at devices such as tablets and smartphones. 

Also, Qt is licensed under permissive, non-copy left licenses which greatly simplifies what must be done should you ever modify the code base for one reason or another for a given program you're writing.  It does happen, though is uncommon.  KiCad modifies wx to get it to run properly on OS X, for example. 

Then there is, uh, wxqt.  That just confuses and frightens me. 

I don't have any experience with much else, but I am sure there are other good options too.  gtk+ looks nice, despite evolving from the GUI for GIMP, generally regarded to be the single worst GUI ever made by man or God. 

 Here is a helpful post that goes more in-depth on wx and Qt at least, on StackExchange.
« Last Edit: November 27, 2014, 08:51:13 am by metacollin »
"Violence is the last refuge of the incompetent." - Isaac Asimov
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30296
  • Country: nl
    • NCT Developments
Re: Cross platform GUI development
« Reply #14 on: November 27, 2014, 06:07:13 pm »
Back when .NET was being transitioned to and tons of developers who had been using MFC for years found their entire knowledge base suddenly deprecated.  That's a pretty awful situation to find oneself in, so enter wxWidgets.  Unfortunately, it inherited a lot of the things that were bad about MFC because of this. 
MFC has been deprecated by Microsoft since they decided everybody should program in VB. When that didn't work out so well Microsoft introduced their own Java: C#.
The Windows backend of WxWidgets may be build on MFC (which at least provides a clean interface to Windows) but that doesn't mean you have to do a lot of work to create a GUI.
Quote
Qt also is originally for use on dumb phones, and was created by Nokia.
That is not true. Qt was originally developed by a company (eventually) called Trolltech which at some point was bought by Nokia in an attempt to make programming on Symbian easier. That didn't turn out well so Qt has been sold to a different company so nowadays you'd need to have a paid license (again) if you want to develop commercial software.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline The Chump

  • Contributor
  • Posts: 49
  • Country: gb
Re: Cross platform GUI development
« Reply #15 on: November 27, 2014, 07:54:32 pm »
For those who remember Borland Delphi and have a soft spot for Pascal
http://www.lazarus.freepascal.org/
I remember but I wish I couldn't  |O Pascal is a terrible language for taking on big projects and Borland's inconsistent libraries and bolted on band-aid features to do C style programming didn't help much.
bbb..but I'm not recommending Delphi or Kylix, I'm offering Lazarus is answer to the original question.
I don't see how pascal is sooo bad for big projects. Maybe you'd like to bore us with your wisdom
 

Online enz

  • Regular Contributor
  • *
  • Posts: 135
  • Country: de
Re: Cross platform GUI development
« Reply #16 on: November 27, 2014, 10:03:39 pm »
Quote
That is not true. Qt was originally developed by a company (eventually) called Trolltech which at some point was bought by Nokia in an attempt to make programming on Symbian easier. That didn't turn out well so Qt has been sold to a different company so nowadays you'd need to have a paid license (again) if you want to develop commercial software.

Sorry, but the last statement is not true. You can still use Qt without a paid license even for commercial closed source applications. Take a look at the license options at http://www.qt.io/download/
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30296
  • Country: nl
    • NCT Developments
Re: Cross platform GUI development
« Reply #17 on: November 27, 2014, 11:35:01 pm »
Quote
That is not true. Qt was originally developed by a company (eventually) called Trolltech which at some point was bought by Nokia in an attempt to make programming on Symbian easier. That didn't turn out well so Qt has been sold to a different company so nowadays you'd need to have a paid license (again) if you want to develop commercial software.

Sorry, but the last statement is not true. You can still use Qt without a paid license even for commercial closed source applications. Take a look at the license options at http://www.qt.io/download/
I've read the page about licensing. If you care to read it also you see that you need to pay to make proprietary software. On the page you linked to it even says you can't keep modifications to Qt for yourself.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30296
  • Country: nl
    • NCT Developments
Re: Cross platform GUI development
« Reply #18 on: November 27, 2014, 11:38:58 pm »
For those who remember Borland Delphi and have a soft spot for Pascal
http://www.lazarus.freepascal.org/
I remember but I wish I couldn't  |O Pascal is a terrible language for taking on big projects and Borland's inconsistent libraries and bolted on band-aid features to do C style programming didn't help much.
bbb..but I'm not recommending Delphi or Kylix, I'm offering Lazarus is answer to the original question.
I don't see how pascal is sooo bad for big projects. Maybe you'd like to bore us with your wisdom
Pascal has been developed as a structured language to LEARN programming in an organised and structured way and not for real world programming. The real world isn't structured (changing requirements) so if you are creating a big project in Pascal you'll find yourself spending a lot of time fighting the rigidity of Pascal instead of working on your software.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5524
  • Country: gb
Re: Cross platform GUI development
« Reply #19 on: November 27, 2014, 11:51:54 pm »
If it's mobile platforms as well as OSX and Windaz, I use Marmalade which is C++. Single source covers all bases and runs natively, no Java/C# indeterministic nonsense ;-)

Android, iOS, even Windaz Phone are covered.

Although Windows (both desktop and Store) and OSX is supported on the desktop, however Linux is not.

Writing app code is not really my bag, but the Marmalade platform keeps me close enough to the hardware that I don't get all teary eyed not being able to look at the assembly langauge and CPu registers.
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Cross platform GUI development
« Reply #20 on: November 28, 2014, 05:29:39 am »
There are a LOT of suggestions in this topic that are not really cross platform...

In my opinion Qt is pretty much the best and only choice. It has bindings for a LOT of languages and the documentation is excellent, has a boatload of features and supports something like 12 different platforms. Including Android, iOS, Linux, embedded Linux, Windows, Mac...
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4596
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Cross platform GUI development
« Reply #21 on: November 28, 2014, 06:32:03 am »
I really like Qt, because you only have to download ONE single package to get it working. Includes documentations and source.
With WxWidgets you are also able to build on other platforms, but setting up the toolchain isn't that easy.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2425
  • Country: de
    • Frank Buss
Re: Cross platform GUI development
« Reply #22 on: November 28, 2014, 06:43:36 am »
I've read the page about licensing. If you care to read it also you see that you need to pay to make proprietary software. On the page you linked to it even says you can't keep modifications to Qt for yourself.
The community edition is LGPL. It is true that you have to release modifications to Qt as LGPL open source, but you don't have to release your software that uses Qt as open source. And usually you don't need to modify Qt itself.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline nixfu

  • Supporter
  • ****
  • Posts: 346
  • Country: us
Re: Cross platform GUI development
« Reply #23 on: November 28, 2014, 07:24:54 am »
Qt is the most popular cross-platform gui toolset it seems to me in the industry outside of using Java.   

 

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4596
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Cross platform GUI development
« Reply #24 on: November 28, 2014, 10:40:17 am »
The community edition is LGPL. It is true that you have to release modifications to Qt as LGPL open source, but you don't have to release your software that uses Qt as open source. And usually you don't need to modify Qt itself.
Origin, the steam rip-off from EA, is Qt.
I've seen Qt dll's appear in the most unexpected places.

Regarding to the startpost questions, USB isn't as easy to do with Qt.
Networking is, and Serialport works on most x86 platforms. Raw USB requires some more effort, for Windows at least.
On mobile you have tty over audio.

I do know of at least some more expensive all-in solutions which claim to be multi-platform with all different kind of grahpics and driver features. But their prices are in a range that they do not deserve to be mentioned.
Other free alternatives require extensive toolchain knowledge and will make you rely on open source projects.
That can either be fast and cheap to start with, or a lot of work when it suddenly becomes incompatible after a platform update, such as Windows 9 or OS X Snow Yosemite.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->