I have searched the web for information on creating GUIs(Games, Forms etc) in c++, I have found that OpenGL, Direct X and .Net framework can do this. The question I ask is which one is better to learn, what library for GUI in c++ is the most popular in industry. I know this is a newbie question, but if some on could lead me to the correct path it would be greatly appreciated.
OpenGL and DirectX are different to .Net framework. OpenGL and DirectX are for game development (Graphic acceleration) but .Net framework is for .Net development. If you use .Net framework then your program is not compiled to native code, it will be compiled to MSIL (Microsoft Intermediate Language) then .Net translate it to Native code at run-time (for the first time).
If you want a GUI toolkit for your C++ program, Qt, MFC and wxWidgets are a good choice. Qt and wxWidgets are cross-platform libraries thus your program will be compiled on all platforms (Windows/Linux/Mac OS). But MFC is only available for Windows. Qt is more feature-rich than wxWidgets and maybe is a better choice.
I like QT myself.
Because you mentioned DirectX I'll assume your using windows, for that I would reccomend the basic Win32 API. If you want cross platform capabilities however, I would suggest Qt.
I have searched the web for information on creating GUIs(Games, Forms etc) in c++...
What would work fine for creating traditional form-based applications won't work so well for creating games, and vice versa.
You would be better off using C# with the .NET libraries as the C++ managed extensions can be a little cumbersome. If you must go with C++, then Qt and wxWidgets are both decent options, although you're more likely to find more help and online resources for QT.
If you need to do graphics like games, then you'd better off using a higher level library than directly using DirectX or OpenGL. Ogre3d is one option on the open source side, the C4 engine is an affordable option on the commercial side. If C# is an option, then might want to look at XNA and Unity3d.
Related
I'm developing a segmentation tool (for research purpose, not for commercial use) and I was wondering which graphical user interface should I use as there are many.
I'm looking for a relatively simple interface which allows me to do as follows on the same window:
*Input variables that will be used by the algorithm
*Browse a folder and select images
*Call functions by clicking on a button
*Display an image that will evolve while the algorithm is running
I'm coding in c++ with visual studio 2010 and I'm using additional libraries such as OpenCV, so the GUI library must be compilable and usable on console project on VS2010.
So far I've tried Qt, FLTK, GTK+ but Qt as compatible issues on x64 architectures, FLTK is lacking documentation and I'm not sure it answers to my needs and GTK+ wasn't working.
Thank you very much for any input and help you can give me.
Keep it simple.
If working with C++ on Windows with a "non-express" version of Visual-Studio, just use MFC.
The framework is mature and there are tons of reference, examples and samples on the web (codeproject, codeguru, MSDN, ... )
Have you tried OpenCV's own highgui?
http://opencv.willowgarage.com/documentation/python/highgui__high-level_gui_and_media_i_o.html
"While OpenCV was designed for use in full-scale applications and can
be used within functionally rich UI frameworks (such as Qt, WinForms
or Cocoa) or without any UI at all, sometimes there is a need to try
some functionality quickly and visualize the results. This is what the
HighGUI module has been designed for."
Also see: OpenCV and creating GUIs
I want to develop a custom window system in c++ that should not depend on win32 library. As an example, Google Chrome has an interface that is not similar to windows own interface. Similarly MPCstar and adobe products have their own interfaces. Please help me where to start for such a project?
You can use cross platform
Qt
or
wxWidgets
but in my opinion Qt is better.
Qt is awesome even if you don't need cross platform support. I assure you after using it you won't understand how anyone could ever develop native GUI on frameworks like Win32 and MFC. Its only shortcoming is the size of the DLLs you'll have to distribute with your app.
BTW is C++ a prerequisite? if not, and you only need windows, use .Net.
I believe Qt should do the trick. I've never used it myself but it is platform independent. I know a few applications that use it, and it seems fine.
Qt and WxWidgets are the better options. And since its GUI I think Qt performs better and has greater support and lots of libraries.
Find Qt here!
I've got my interpreter up and running - quite bug-free and stable for now - now I want to add some visual options to my language to play around.
What is a good GUI library easy to use and mainly easy to embed and "link" to my programming language?
What general rules do I have to follow?
I'm currently on XP with Microsoft Visual Studio 2010.
Depends on your language and it's properties. For example, if you can only expose C-style functions, then the default WinAPI supports this style. If you can do the whole C++ classes malarky, then you could do MFC, GDI+, WIC, etc.
Ultimately, if you want something easy to embed, it's simpler to write good embedding code than worry about what you're going to embed.
In various posts I have seen regarding UI Libraries QT and WxWidgets seem to be popular.
Look here for a list of features
Check out the fast light toolkit (FLTK) at http://fltk.org. From that website:
FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation.
I want to make a nice simple gui using c++. which have drag and drop capabilities, must be light weight. Im thinking of a gui like utorrent client gui.Its light weight and simple.
please give me information about most easy to use libraries / ide /plugin (on windows platform may be good).
Either use QT or wxWidgets. Both are free to use, but QT uses more advanced features of C++ and is used slightly more than wxWidgets (From what I have seen) and has the backing of Nokia.
Both have various gui editors. QT has a QT Creator and there is a list of tools on the wxWiki, which includes a lot of open source RAD gui designers.
I have experience of using wxWidgets in both C++ and Python, and would recommend wxFormBuilder as a GUI designer.
The downside to both is they feel the need to use their own string classes etc which duplicates the functionality of the stl. From what I understand is that this is because when the projects were started there wasn't a standard.
Qt seems to be the most natural choice for your requirements. It has a complete SDK which includes a GUI builder (Qt Designer), an IDE (Qt Creator), internationalization tools and comprehensive documentation. It can also be integrated with such IDEs as Eclipse and MSVS.
In addition to GUI libraries, it has lots of utility classes including containers, facilities for working with file system, processes, XML-data and databases, etc. So you can write the code only once and it will work on every platform supported by Qt, you'll just need to recompile it.
If it seems a little too stodgy at first glance, you may rebuild the Qt libraries from source to include only those modules you actually need.
P.S. I wouldn't suggest using MFC. It's just doesn't worth the effort when you have a more friendly and easy-to-grasp choice.
I would go with QT.
Some of the PROs:
Free as in "free beer"
Free as in "free speech"
Multiplatform (Windows, Linux, Mac OS)
Natively written in C++
Easy to use
In my opinion, some of the CONs:
If you are only targeting Windows platform, you might get better looking (and faster?) UIs with MFC (Microsoft Foundation Classes)
Yet another vote for Qt. I am using it since about 8 years for now (EDA branch) and it works out very good.
I work in a team of developers, one of us works specifically under Windows, and I work primarily in Mac OS X. We're wanting to develop C-based applications either in C++ or Objective-C however I'm not really knowledgeable in how to go about a cross-platform development project.
Is it viable to work in C++ using Mac OS X? Obviously they're geared towards Objective-C but is there just as much support for C++. What about cross-platform development in these languages? I'd use something like boost and some kind of UI library.
Has anyone got any experience in developing for multiple platforms yet allow applications to run natively without the need for a VM?
EDIT: There's a lot of answers I want to mark as correct now. It seems like Qt is the way to go and develop it in C++. Chances are this will be for *nix, OS X and Windows so that would be the best option for us personally. If I can avoid writing Objective-C so the team sticks to C++ then all the better. If I have to write the GUI in Objective-C and mix and match then that's not too much bother either.
I work for a software company that produces software for Mac OS X and Windows using C++, MFC, and Objective-C.
Yes, it is definitely possible.
You probably will be best served if you develop the "core" of the application in C++. In a MVC application, the C++ part would be the model, and possibly the controllers. For the code that interfaces to the GUI and other OS-specific interfaces, you should use the native APIs: Objective-C on Mac OS X and C# on Windows XP.
The good thing about the Mac is that you can compile C++ and Objective-C together. You can even have Objective-C++ where C++ and Objective-C are compiled in the same compilation unit. Unfortunately you cannot do this with C# (there is something called Managed C++ which is a different beast).
I would avoid cross-platform frameworks such as Qt and wxWidgets. They both allow you to develop cross-platform applications, but the look and feel of such applications is sub-par. I have more familiarity with wxWidgets though, its design is heavily geared towards the Windows MFC paradigm of application design.
Edit May 14, 2009, 9:44 AM EST: If Qt now allows true look and feel of the native platform, it could be a good option. I haven't looked at the latest offering so you may want to look at that framework before designing your own. That decision should be made after examining the results of the applications and how comfortable you are with the design paradigms that Qt requires.
You could look at Qt. I've used it successfully on Windows, Linux and Mac OSX projects.
what I use, is have a common library written in C or C++ with all the core functionality of your application.
Let's say you are building a solitaire game. So you will have core classes in a pure C++ (mostly platform independent) library.
CoreSolitaire
Then, you will have separate UI projects, one for each platform you want to deploy your solitaire on:
iSolitaire (Objective-C, MultiTouch Cocoa Based for iPhoneOS)
MacSolitaire (Objective-C, Cocoa Based for Mac OS X)
WinSolitaire (C++, Win32 or C# Based for Windows plaforms)
GSolitaire (C++, GNome/GTK based for linux/unix)
It's more work, but, in my opinion, the resulting product is definitely better than one you could get by using a platform independent widget set like QT or wxWidgets.
Having said this, if you are going to deploy your product internally in a company where you have full control of the deployment environment, and you don't care that much about how the resulting product will behave on different platforms, you could definitely use a common API for everything (QT, wxWidgets, or any other you might encounter).
Is it viable to work in C++ using Mac OS X? Obviously they're geared towards Objective-C but is there just as much support for C++.
Yes, there is.
You can do pretty much anything you want with C++ in OS X --anything that you could do with C++ on Linux, for example. There is support for the gcc's C++ compiler, c++ libraries, et all. Xcode provides support for working with C++.
You can even mix c++ with objective-C with Objective-C++ (Note, however, that this is not portable for GUI work).
What about cross-platform development in these languages? I'd use something like boost and some kind of UI library.
I believe that your best bet is QT.
It is a stable C++ library that is cross-platform (Windows, OSX, Linux and more), has been around for over a decade, is well supported, with many commercial apps written in it (Skype, Adobe Photoshop Album) and a ton of open source stuff written with it (the KDE desktop for starters). Besides GUI stuff it provides a whole lot more (container classes, xml, database connectivity, etc).
You can develop both Open Source and proprietary (closed source) apps for free with the latest QT, and the library was recently bought by NOKIA, a huge multinational, so it isn't going away any time soon.
Besides the library, QT also comes with an IDE and a Visual Forms Designer (all for free).
Other cross-platform GUI libraries for C++ also exist for OS X (wxWidgets, gtkmm, et al).
Has anyone got any experience in
developing for multiple platforms yet
allow applications to run natively
without the need for a VM?
Slightly. Make sure that you wrap around all the platform specific code.
That way you're main application or library doesn't need to reference the platform specific code. That should make it alot easier when porting to another platform.