How to create desktop application using fully customized UI? - c++

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.

Related

How can I embed a custom QWidget in a QWebEngineView or page?

I know it is possible to do this with the deprecated class QtWebkit as shown here.
I would like to know if similar work can be done with the new QtWebEngine framework? I could not find a method to create plugin in a web page (QWebEnginePage). Is this related to the plugin technology in Chromium?
I'm currently just exploring the possibility of achieving this with Qt 5.5.
I can't find a completely clear answer one way or another, however at the end of the porting guide there's something that would suggest it's no longer possible:
Qt WebEngine renders web pages using Skia and is not using QPainter or Qt for this purpose. The HTML5 standard also now offers much better alternatives that were not available when native controls plugins were introduced in Qt WebKit.
No QPainter would mean that there's no way to draw a QWidget during render.
Instead of embedding a QWidget in a QWebEngineView, you can have a QWidget as the child of a QWebEngineView. You may need to fiddle a bit with positions, transparency, and/or stacking order but it is doable. You can coordinate between the QWebEngineView and the native Qt code using a QWebChannel.
I have this working tolerably well on DomTerm (hhtps::/github.com/PerBothner/DomTerm). DomTerm is a rather complicated (partly because it supports lots of configurations including running on other frameworks besides Qt and using iframes instead QWidgets). However, handling the "embedded" QWidgets is relatively simple. If there is interest I can explain more how it works, and the most relevant sections of the code.

wxDialog inside wxWindows

when wx.Dialog is created it can take any position on the computer screen and take any dimension if style allows. I am trying to build dialogs and confine them within the application window.
I am not sure if my question is clear, I guess an online imagine would be a good example of what I need to do.
in the current link, "spectra analysis" is an exact example of what I need.
http://cdn.altrn.tv/s/b80a7d76-3293-45f2-84dc-07ae136df1c6_1_full.gif
The UI in the image is using the Multiple Document Interface, and in wxPython on Windows you can get the same UI by using the wx.MDIParentFrame and wx.MDIChildFrame. However be sure this is what you need because most users do not like MDI and even Microsoft abandonded it in their applications long ago.
You don't want dialogs. You most likely want to look at the AUI widgets. There are the old wx.lib.aui widgets and the newer wx.lib.agw.aui widgets. I recommend the AGW version as it is written in pure Python and has had lots of enhancements done on it. I don't think the old wx.lib.aui widgets have had any attention in years.
See the wxPython demo for examples.

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

How to develop nice-looking, visually modern applications in QT?

I'm wondering how to develop visually modern, with attractive GUI applications in QT. When I run QT Creator and start new project, the GUI looks very basic and "pure", just like simple win32 apps. But look for example at Allegorithmic Substance Designer 2, where GUI looks somehow similar to WPF. There are many other applications with nice-looking GUI. So, the question is: how to do this? Is there any extension/library to QT, which provide richer GUI experience? Or it must be developed from scratch? Thanks for replies in advance.
As well as Nano's answer, I think it would be worth your while to search around for any Qt stylesheets others have made.
For example, this one that mimics Microsoft Office.
Unfortunately, there doesn't seem to be very many of them available.
I found these useful links, some of whose links may give some ideas:
Qt Stylesheet Snippet Repository
Another idea might be to search for example qml files in Google Code Search. This search for .qml files has plenty of hits. Before using any of them, you would obviously need to check its license.
Have you tried Nokia's Qt Creator? If you're looking for something "similar" to WPF I assume you're referring to its declarative nature, QML being XAML's counterpart in such regard.

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

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.