Easiest cross platform widget toolkit? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
What is the easiest cross platform widget toolkit? I'm looking for one that minimally covers Windows, OSX, and Linux with a C or C++ interface.

I don't know of any I've personally used with a C API, but wxWidgets is C++. It runs on Windows, Linux, and Mac OS X. And if you're looking for easy, wxPython is a Python wrapper around wxWidgets and it is pretty easy to use.

I really like Qt. Have been working with it in several projects now.
Although the project, I am currently working on, will be released for windows only, some of our developers code under Mac OS X using the gcc. And using different compilers and environments is an extra benefit for locating errors & bugs.
I forgot to mention that Qt has a really good documentation including lots of practical examples that help for a quick start.

I've used both wxWidgets and QT professionally. Both are certainly capable of meeting your goals. Which one is easiest is hard to say. You don't tell us whether you're looking for easy to use, or easy to learn. Qt is easier for big programs. WxWidgets is easier to learn. This for a large part due to the signal/slot mechanism in QT, which is a good but non-intuitive architecture for large applications.
Both libraries are actually so good that I'd recommend them for non-crossplatform programming too.

Are we talking GUI Widgets? If so, I can suggest 3
FLTK:
http://www.fltk.org/
GTK:
http://www.gtk.org/
QT:
http://trolltech.com/products/qt/

As with the other posters, I strongly recommend looking at C++ toolkits. GTK will work on Windows and the Mac OS, but will only give you truly good results on Linux. And even some of the GTK maintainers are inventing their their own object-oriented C dialect to avoid writing GUIs against the native GTK API.
As for C++, it depends on what you want. Ease of development? Native GUIs on every platform? Commercial support?
If you want native-looking GUIs on Win32 and Linux (and something semi-reasonable on the Mac), one excellent choice is wxWidgets. Here's a longer article with real-world wxWidgets experiences. The Mac port has improved substantially since 2002, when that article was written, but it still has some soft spots.

The easiest to write a new program in would be the one you're most familiar with.
The easiest to use, test or distribute would probably be the most cross-platform, most distributed or the most supported one, so GTK+/wx/Qt/Tk?
Note that C itself isn't a particularly easy language, especially with the growing object-oriented approach to GUIs.
The easiest one to cook up a prototype in a scripting language, then convert to a compiled one might be any toolkit with a scripting language binding (pyGTK, wxPython, etc.)
That being said, of the "big" ones, only GTK+ and Tk have a C bindings. wxWidgets, Qt and FLTK were all written in C++ and don't have any C bindings as far as I know.
I suggest you look into learning C++ and then comparing the available options. Coding in C++ might feel like coding in a scripting language with great conveniences such as automatic pointers, utility classes and overloaded operators, non-invasive garbage collectors and easy to inherit parent classes all brought to your fingertips by the language itself and your widget toolkit.
Then my personal suggestion would be wxWidgets; quite easy to use, better documented than GTKmm and "freer" than Qt.

Related

C++ cross-platform framework for mobile app development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Improve this question
I'm planning on developing mobile application for both iOS and Android and I want to use C++ for the development.
Which cross-platform framework is available for building mobile application using the C++ language.
I'm sure a lot of people have this question as well, so read this if you'd really like to know the answer. Marmalade is probably the BEST solution. Code once, deploy to mobile devices, desktops, even some TV's. Many popular games have been created with Marmalade.
Extensive games like:
Lara Croft and the Guardian of Light
Call of Duty: World at War Zombies
But also simple games like:
draw something.
Doodle Jump
They've added a free package. You can create your game for free and if you want to get rid of the ad splash screen, it's $150,- per year for mobile devices or $500,- per year for other devices as well.
A big advantage is the native speed. It doesn't matter what people claim about other languages like javascript or java (and unfortunately Qt, which of course isn't a language but you know what I mean) running as fast as C or C++. It's simply not true. For simple applications this is of course not important, but when you're looking at (simple) games, this is crucial.
At the moment version 7.3 is available, but this version has a problem with the ARM emulator. I would download 7.0.
Whether you choose Marmalade or not, make sure you read the documentation. You don't want to end up missing some functionality and switch to another option when you're almost finished.
I've looked into portable code between Android and iOS before and I don't think it's possible.
To release apps into the Android market it needs to be in Java, and anything with a GUI on iOS needs to use Objective-C.
You might be able to have partial portable C++ layer, but in reality it's probably quicker to write the same app twice in Java and Obj-C than it would be to write it once in C++ as a portable solution.
Qt or Wx-Widgets might have some support, but I have not looked into mobile platforms for these, and I suspect the reality is that Apple, Microsoft and Oracle want you to be tied into their technologies these days and have no incentive to make things portable.
C# and Java provide a complete framework that allows code to be written much quicker using well documented classes and libraries, especially when dealing with user interfaces.
C++ on the other hand relies on many open source projects that take a lot of effort to get functioning on multiple platforms, and much time is spent dealing with subtle platform problems.
My suggestion was simply that it might be easier to pick a language better suited to the platform you are dealing with, as C++ tends to be lower level than other languages, the syntax can seem verbose and many hours can be wasted trying to make things work that you would expect to just work, and unfortunately documentation for many open source projects is poor.
Maybe this can be considered to be an opinion, but then the shift from C++ to C# or Java commercially might also indicate that I'm not the only one believing this.
You can take a look on openFrameworks, maybe it fits on your needs:
http://openframeworks.cc/about/
There ARE solutions for C++ cross-platform development for Android and iPhone, despite what other answers say here.
The best is probably Marmalade, but it's expensive, so only useful for commercially viable apps: https://www.madewithmarmalade.com/
Then there's MoSync, which you can use for free. Unfortunately they went bankrupt last year, so there's no ongoing support. Still, might be worth a look depending on your needs. http://www.mosync.com
OpenFrameworks is one I hadn't seen, so thanks Rodrigo for that answer: http://openframeworks.cc/
There is no cross platform solution using C++, unless you're interested in making games. There are a few options available if you don't mind using another programming language. Take a look at Titanium SDK (Javascript), Xamarin (C#) or the multitude of HTML5/CSS/Javascript frameworks (Phonegap comes to mind).
Look for the DragonFire SDK it allows you to write apps and games in c/c++. Not cross-platform and never used it but looks good. It uses Visual Studio and has its own simulator for iOS development.

What is a simple, testable, cross platform C++ GUI? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am looking to build a very simple GUI for a C++ application. Fancyness, design and advanced features don't matter. What is important however, is that I can write automated tests against it, programmatically checking content of fields and clicking buttons. It also needs to run at least on Linux and Windows, preferably also Mac. Any suggestions?
Edit:Open Source tools are highly preferred.
Sorry I am a bit late in answering.
Well there are many options in GUI programming. However, since you say you want something simple without flairs and eye-candy, the choice narrows down a little. Here are my suggestions:
QT
Pretty awesome. Don't want to sound like a Nokia (or Trolltech) evangelist, but this framework has it all. Mature API, Good design, Platform independence, Flexibility you name it! However, simplicity? Well... that's not a strong point, in fact, QT is the exact opposite. It tends to be more on the extremely heavy and well-armed side, definitely not simple.
GTK+
Again, pretty cool. Supports less platforms than QT, but has a pretty mature API, works on all the platforms you mentioned, the design is pretty awesome too. Flexibility? Well the new GTK+ 3 is a lot flexible but GTK+ 2 (the current latest supported version for Windows) lacks a bit in this respect. It's simpler than QT however, less eye-candy etc. But it relies on a ton of third-party libraries, which is a bit of a disadvantage for some platforms.
For a comparison between the above two, see one of my previous answers.
FLTK
Frankly, IMHO this is the toolkit that fits your needs the best. It's simple, platform-independent, very easy to deploy and cross-compile and pretty mature (though it's community is not quite as active as GTK+ and QT). It's OpenGL based, and looks pretty much similar on all platforms (I don't know if this is a pro or con in this case ). It's got a pretty lenient license, you can statically link the entire library, no dependencies except OpenGL.
Runs on all platforms supported by OpenGL.
I am looking to build a very simple GUI for a C++ application. Fancyness, design and advanced features don't matter. What is important however, is that I can write automated tests against it, programmatically checking content of fields and clicking buttons. It also needs to run at least on Linux and Windows, preferably also Mac.
Overall, from the requirements you mentioned, I think FLTK is ideal for you. Though you should also take a look at the other two if you aren't satisfied.
Update:
Testing Frameworks:
Unfortunately, I haven't seen any good testing framework for FLTK though. For QT, there is the QTestLib. For GTK there is dogtail.
Suggest that you use Qt as mentioned above. It is mature and there are new features getting added. To test apps written in Qt, you have the following options
QtTestLib
Squish
And some more ideas on QtCentre
Update: Since there is support for Python and Qt in pyqt creating a test-suite using something like pyunit will be a good option
I am not aware of the level of support for other libraries, but good contendors are - wxwindows and GTk
QT http://qt.nokia.com/products/qt-sdk/
Have you looked into Qt library? http://www.qt.io/
You can try fltk it is cross-platform and lightweight. The other choice is qt

Free C++ library for windows gui [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I just want to write a very simple C++ program for Windows only that uses a GUI. What library for C++ is free and allows me to do this? (This code is not, and will never be, open source).
+1 for Qt.
Qt is bloody awesome. Once you've hacked around with QT you will never, ever want to go back to any other UI API. Seriously. It's. That. Good.
There's also a free IDE that you can use that makes development even more painless. Oh, and the community is very helpful and generally kicks ass.
All Hail Qt!
You could use WxWidgets. From the blurb:
Unlike other cross-platform toolkits,
wxWidgets gives its applications a
truly native look and feel because it
uses the platform's native API rather
than emulating the GUI. It's also
extensive, free, open-source and
mature.
GTK+ and for C++ GTKmm I guess.
Maybe but maybe also Qt.
I think you could do that with Qt.
Here you go.
WTL is quite popular. If you visit the SourceForge page you will see praise heaped upon the project.
There are long fights about choosing free and/or portable GUI for c/c++ applications. Each programmer has his own favourite, and only few programmers have tried multiple of them so they can compare. So I suggest you to google some more for various comparations.
From what I hear all the free ones suffer lack of documentation and code updates, but all of them have good user support through forums or IRC channels. Qt has better support/userbase but is not completely free (but I can't provide you with details for that).
I have used Visual Studio MFC before and then when I wanted to have free and portable GUI I choosen GtkMM. I have to say that it was PITA to switch as GtkMM is not documented very well, its functionality is sometimes confusing, I had to recompile and modify few things (like widget with in-dialog OpenGL support) but I was able to finish my program successfuly. On the other hand, starting with MFC wasn't easy too.
But I'm not suggesting GtkMM over other ones. So I just can provide the list: Gtk, GtkMM (Gtk++), Qt, wxWidgets.
There are so many C++ GUI frameworks: Qt, gtkmm, wxWidgets (all these are specified above).
Add FLTK to that list.
If it is only for Windows and you use Visual-Studio you may use WinForms or the more up to date WPF. There is a nice GUI designer in the Visual-Studio and it is free for any purposes.

minimal cross-platform gui lib? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a minimal and easy to learn C or C++ cross platform gui library.
In a nutshell I only need the following functionality:
application window
menu bar
some simple dialogs, File-open and save. Maybe a user-written one.
user canvas where I can draw lines an circles on.
some kind of message/event loop mechanism.
Target platforms would be Win32 and linux. MacOS would be nice to have but is not important at the moment.
Why am I looking for something minimal? I don't want to spend much time to learn a big and full blown abstraction system for a really small application. The easier and leaner, the better.
Any suggestions?
If you need something small, try FLTK libs: I used them at work (embedded development) and I think it's a valid option. Maybe apps are not as "cool" as QT-based ones, but developing with FLTK libs is fast and easy.
I don't know about minimal, but Qt is pretty easy to learn.
Its light-weight enough to run on embedded devices, so you be the judge.
EDIT after seeing the comments:
Yes, Qt is a fullblown application framework, but here's my case: an app with cross platform GUI but other platform-dependent code is not really platform independent. I don't think moving existing C++ code into Qt entails any work at all. If anything, this would allow Nils to use his existing C++ code, and only use Qt for a GUI. But of course, I assume that the existing C++ code is portable.
wxWidgets (formerly wxWindows) is a widget toolkit for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with minimal or no code changes. It covers systems such as Microsoft Windows, Mac OS X, Linux/Unix (X11, Motif, and GTK+), OpenVMS, OS/2 and AmigaOS. A version for embedded systems is under development.
http://www.wxwidgets.org/
See Good C++ GUI library for Windows for relevant answers.
Personally, I would go with Qt, now that it's open. You don't necessarily want a minimal library, you want one that is easy to use, and quality documentation and community support will give you just that.
Small projects have the nasty habit of sticking around and picking up scope -- as things get hairier, you don't want to be stuck with some small library that nobody knows about.

Gui toolkits, which should I use? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am writing a fairly large and complex data analysis program and I have reached the point where I think it is about time to build a GUI for the program. So my question is:
Which GUI toolkit should I use?
I am completely new to coding and building GUIs and would appreciate any guidance that can be offered. It doesn't have to be the simplest tool kit in the world, I learn rather fast. However, it does need to be able to do the following things (some if not all of these are probably incredibly basic for any given toolkit but I thought that it would be good to throw all this out there just in case).
It has to allow me to draw directly to the screen so that I can put graphs (spectra really), plots and things like them up for the user to see. I need to be able to collect position information on where they clicked on aforementioned spectra. I need to be able to display text and take text input from the user. It needs to be able to generate menus (you know File, Edit, etc). If it were to have some built in widget for generating tables that would be handy (though I can surmount a lack of that if I can draw directly to the screen). It needs to be able to pop up warnings, dialogue boxes, save and open boxes, etc. That is pretty much it, most of these seem pretty basic when I write them out but I don't want to get the GUI partly coded and then realize that I I need to rewrite it with a different toolkit.
It should be noted that I have written this program in C++ and that I don't want to have to write the GUI part in C or something else so the toolkit needs to support C++.
Additionally a cross platform toolkit would be preferable over a single platform toolkit. However if it must be a single platform toolkit then I would prefer it be for Linux.
Finally, I would DRAMATICALLY prefer an open source toolkit to a closed source toolkit.
Beyond that I cannot think of anything to add. Thank you in advance for your time and answers.
Hmmm based on the answers I shall look at both Qt and wxWidgets and see which appeals to me more. I with I could accept multiple answers as accepted but I can't, and since I am looking at two things it would be unfair to only accept one of the answers, perhaps in a week or two then I have looked at the toolkits and figured out which I want to use.
For C++, in my opinion, Qt is the least frustrating and most fully featured toolkit. Its also fully cross platform. Note that Qt will be LGPL licensed some time in March 2009, when version 4.5 becomes available. Currently, its only offered in a GPL and commercial license version.
Qt's GUI designer is good. It has lots of utility functions (scene graph library, translation support, built-in Javascript engine, built-in WebKit library). Via the MOC (a special pre-compiler) it also brings a few run-time binding capabilities and introspection to C++.
For your technical application, you might find that Qwt (http://qwt.sourceforge.net/) provides what you need. It is built upon Qt.
Qt can even be used "headless" if you want its utility support (such as networking, etc) without a GUI.
The other cross platform C++ option is wxWidgets, which is usable but not really comparable to Qt. Its a much lower level toolkit, and isn't as easy to use or fully rounded. Gtkmm is another option, in the spirit of GTK+.
Try WxWidgets. Cross platform (compile on Linux, Mac OS X, and Windows) and widely accepted.
http://www.wxwidgets.org/
Open Source too!
I see nobody commented on GTKmm. It is the C++ incarnation of GTK+, and it is a real pleasure to use. I have also used Qt, but I don't like the messy signal/connect code, the moc_XXX generated files, etc. GTKmm has signals and such, but not that preprocessing step, as well as almost all of the Qt toolkit can offer in the graphics arena.
I'd say it depends on whether or not you want the native Look and Feel of the OSes you're targeting for your application. Qt, like said earlier, is probably the easiest of the cross platform toolkits to use, however it is its own widget set. You don't get a native app look & feel unless you happen to be running on KDE.
I use wxWidgets at work. It can be frustrating at times and in some places not very polished, but it does give the native look and feel for the platforms you're targeting. It actually wraps the native UI controls to give them a common API on all platforms that wxWidgets is ported to.
I had the same question and searched for good GUI toolkits.
At the end I found out, that a GUI toolkit isn't enough - I need a complete platform independent solution providing me the build environment, IDE integration and lower level functions like network sockets and file I/O.
My result? Since nearly 9 years I use Qt (but the first years only for GUI stuff) - now I have highly complex networking apps with load balancing, massive multithreading and image processing.
You can use Qt as commercial user with professional support (like me) or just start your own projects under GPL and with 4.5 with LGPL (which allows commercial use).
The other alternatives like wxWidgets and GTK++ are very good choices for GUI programming.
But if you want a well documented and complete solution, then Qt is your choice.
Best Regards,
3DH
I'd also recommend wxWidgets together with DialogBlocks, which is a really nice visual GUI builder.
I will say that wxWidgets has a few rough edges, but the development community is very active and extremely responsive to bug reports / questions / contributions.
I use wxWidgets(toolkit) + wxFormBuilder(gui-designer) + eclipse(ide).
All tools are cross-platform and free.
Qt. Also you can use KDE which is built on top of Qt.