Which C++ cross platform GUI framework has good skinning ability? - c++

What is a cross-platform C++ GUI framework that has good skinning ability?
So I could (and give the users) the ability to customise the GUI.

The Qt framework allows for changing the appearance of widgets using style sheets (using css). See: http://qt-project.org/doc/qt-5.0/qtwidgets/stylesheet.html.

EDIT: As you're looking for something like wxSkin, first why not use it in the first place?
Then, if you don't want to use wxSkin, have a look at Juce. Qt's goal is definitely not themeable GUIs although windows masks and stylesheets are a way to implement them. There is the QSkingObject project on Qt-Apps.org but last time I checked it I found that the quality of the code was poor (of course this is subjective and argumentative).
You can have a look at Juce which has a dual license: GPL and commercial.
Qt (LGPL) has stylesheets to style the widgets, but it still let the operating system draw the windows decorations unless you instruct it to draw frameless windows and draw the decorations by yourself.
However, think twice before going the skinned application route. A typical example is Songbird (written in XUL) which used frameless windows and painted its own titlebar and windows buttons. Then they back-pedaled and switch back to system windows decorations after many users complained.

Qt has convenient support for that with Qt style sheets et al. The Qt labs blog had an example post that might give you an idea.

As other say, Qt's stylesheets work well.
You also have the option to customize the drawing in Qt by overriding QStyle. You could allow users to use plugins (exporting a QStyle implementation) to make it super-customizable.
(Then, I don't know if your users are C++ coders or not...)

I've used Juce (compatible with Windows, Linux and Mac OS X) in the past and it has a LookAndFeel class (gotta love the name) that allows you to do that.

I'd have to vote for XULRunner because it's extremely skinnable. However, it's not pure C++: application code is written in JavaScript while extensions can be implemented as C++ XPCOM components.

Related

Does C++ has an equivalent of HTML <canvas></canvas> and JS fillRect?

Is there a way to draw figures in C++ like you do in HTML combined with JavaScript?
By drawing figures I mean the <canvas></canvas> function in HTML and [canvas name].fillRect function.
I'm trying to make a 2D brick breaker in C++
C++ does not have a graphic user interface (GUI) packed in the standard library so you cannot draw using the standard functions.
However GUI toolkits like: Wxwidgets, Tk, Qt and Gtk all support it. In addition most of them support 3d graphics and images as well. In the case of Gtk the GUI can be styled with CSS style-sheets. No JavaScript unfortunately.
You can also use the inbuilt GUI that comes loaded on the operating system you are using. For example under Windows you have the Win32API and under Linux GTK, but note that the Win32API is not cross platform and the default GTK on Linux may not be bleeding edge.
Also you can't use the html or JavaScript syntax in any of these GUI. Canvases would be specifically programmed in C++/C (or the language it is aimed at).
If you want a more html like approach and if your game is going to be Windows only, XAML may also be an option. It is possible to use it with C++.
Also it may be worth noting that Qt is no longer free.
Concisely, win32. It's hard to learn, but it comes with any version (AFAIK, at least 2107 community edition) of Microsoft Visual Studio.

How to create desktop application using fully customized UI?

Have a look at this figure below, which is a Quick Book Enterprise Solution 2014
Judging by its interface (not its DLL), I don't think you can easily guess with what platform/language does the above application was created. Qt? .NET? Java? It has its own border, custom menu, ... etc. In a simple wording, "it has totally customized UI that make it stand from the rest".
What do we need to be able to create this kind of application with fully customized UI? And what if I add cross platform aspect in this application? Different customized widgets in different OSes... but maintaining the same level of UI appearance...
I have previous experience with Qt, .. but I am not sure Qt can do this.. or is it?
For instance, you can write your own plugin similar to the existing qt style plugins.
Here, you can find an example how to write widget based style plugins with Qt 5:
QtWidgets 5.0: Style Plugin Example
You would work with the QStylePlugin plugin interface.
If you are looking into a bit more modern solution, you may find this qml style and theme support documentation useful.

Searching for framework for my application

I am searching for a framework(preferably c++, but i can learn other languages too) for my application. I will write what i need:
Borderless window(no buttons,frames etc.)
Real time 3d model rendering(or at least easy way to show 2d animation made from 3d model)
Cross-platform support(not mandatory)
If there is any other details you need to know, please tell me.
Thanks in advance.
Xojo will also do what you want. It creates Windows, OS X and Linux desktop apps and has built-in support for OpenGL.
http://www.xojo.com
One of the best cross-platform Gui-Frameworks for C++ is Qt. It can do 3d-stuff using OpenGL too. However, if you only need a plain window without any controls you may want to look into the next OpenGL tutorial for some infos.
I recommend Unity.
It works in Windows, Mac, Linux, iOS, and Android. (Furthermore in some game consoles.)
Its support languages are C#, boo and js.
C# is like C++ and easy to learn.

Is QT the right solution for my cross-platform application?

My App is supposed to run on both Mac and PC. It needs to access the local file system and manipulate it. I also need to be able to resize images and create watermarked images as well as thumbnails. It's important for my user interfaces to look as similar as possible on both platforms.
Therefore I've been looking at QT which seems to be really up to date but I'm not very familiar with C++. I noticed that QT has support for the Webkit engine and wonder if my application UI can be written in HTML and be controlled using C++?
has anyone done this before? Any pros and cons are really appreciated.
Use Qt
Qt has a strong user community and easy-to-use documentation. All of the platform-specific code is packaged up into C++ clases (QImage, QFile, etc.).
Don't Use HTML for a Qt GUI
Caveat: If you plan on using an HTML interface I don't know if Qt is really a good solution. The default UI for Qt is XML-based (at design-time! - at run-time it uses the native platform GUI).
I haven't personally used WebKit to implement any user interfaces with Qt and that is not the intended design. Usually you'll invoke WebKit to display an embedded web page or help file.
Use QML for an HTML-Like Interface in Qt
As pointed out by gvd below, if you want to design your interface using HTML-like technology, then you will want to use QML.
Sources:
http://doc.qt.nokia.com/latest/qimage.html
http://doc.qt.nokia.com/latest/qfile.html
http://doc.qt.nokia.com/latest/qtscript.html
Develop C++ Qt application GUI interfaces in HTML+javascript?
http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeintroduction.html

User Interface Controls for Win32

I see many user interface control libraries for .NET, but where can I get similar stuff for win32 using simply C/C++?
Things like prettier buttons, dials, listviews, graphs, etc.
Seems every Win32 programmers' right of passage is to end up writing his own collection. :/
No MFC controls please. I only do pure C/C++. And with that said, I also don't feel like adding a multi-megabyte framework to my application just so that I can have a prettier button.
I apologize for leaving out one tiny detail, and that is that my development is for Windows Mobile.
So manifest files are out.
I just notice how many developer companies have gone crazy with making pretty looking .NET components and wondered where the equivalent C/C++ Win32 components have gone?
I read about how many people ended up writing their own gradient button class, etc. So you would think that there would be some commercial classes for this stuff. It's just weird.
I'll take a closer look at QT and investigate its GUI support for such things. This is the challenge when you're the one man in your own uISV. No other developers to help you "get things done".
I've used Trolltech's Qt framework in the past and had great success with it:
In addition, it's also cross-platform, so in theory you can target Win, Mac, & Linux (provided you don't do anything platform-specific in the rest of your code, of course ;) )
Edit: I notice that you're targeting Windows Mobile; that definitely adds to Qt's strength, as its cross-platform support extends to WinCE and Embedded Linux as well.
The Code Project has lots of UI controls for C/C++
Most of them are focussed on MFC or WTL but there are some that are pure Win32.
As an aside if you're not using a framework, you really should consider WTL over pure Win32. It's low overhead and about a million times more productive.
For prettier buttons, etc., if you aren't already doing it, embed an application manifest so that your program is linked to version 6 of the common controls library. Doing so will get you the Windows XP- or Vista-styled versions of the standard Windows controls.
If you want types of controls beyond what Windows offers natively, you'll likely have to either write it yourself or be more specific about what kind of control you are looking for.
I you don't mind using the MFC libraries you should try the Visual C++ 2008 Feature Pack
Stingray
CodeJock - Toolkit Pro for MFC/ C++
The MFC feature pack is derived from BCGSoft components.
Using winAPI's you can do almost anything you want and really fast too. It takes some time to figure it out but it works. Go to MSDN, lookup MessageBox(), check out DialogBox() and go from there.
I personally do not care for MFC by the way. If you want to use an MFC like approach I'd recommend Borland's C++ Builder. Pretty old but still very usefull I think.