Is it possible to create GUI that looks like Mac in Qt? - qt

I want to make my project look as Mac themed. Is there any library to make it Mac styled.
PS: i don't own a Mac, so i cant use Macstyle n other Mac based libraries.
Kindly help in making my app have a Mac feel.

Yes, it is possible. You have to implement it yourself. You'll need to implement your own QStyle that looks and acts like the mac style without running on a Mac. This would be best done on a Mac, porting the existing style to use progressively less and less support from the native styling. Otherwise it'd be a huge undertaking - just look at how big the Mac style is - ~7k lines, and it still uses Apple's APIs to draw all the elements!
The biggest problem I see is that you cannot reuse Apple's visuals and designs. You need to consult a lawyer to figure out how close to OS X look you can get.

Related

Qt Widgets scaling for multiple platforms and languages

I have a Qt project localized to two languages. Moreover it has to work on 3 platforms: Windows, Mac and Linux. I have some issues with scaling of text: one language may be longer that another and Linux native look (Fusion) is 'wider' too. Unfortunately, I can't even check how it looks on Mac (I have to ask other people to compile this project and prepare release).
I'm afraid that I have to switch style of this project to Fusion because it looks the same on all platforms: than I'll have to handle only localization scaling (If I set the same font and its size for all platforms too). Are there other solutions how to handle scaling of text and widgets for 3 platforms and 2 languages?
In case of switching to Fusion, I can set Fusion as default style for preview (STRL+SHIFT+R in Qt Creator) but I do not know how to set Fusion as default style for designer? Is there a way to do it?
I appreciate any help.

Qt or wxWidgets [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I'm going to start working on a new project. It's a 3D game using OpenGL for Windows, Linux and Mac OS X. and I'm going to need a library for GUI, windowing and handling input. I ended up with 3 choices Qt, WxWidgets and GTK+. All of them are under LGPL license.
1- Does LGPL allow to use these libraries to make proprietary applications?
2- Which one of these 3 applications is best for me?
Yes, so long as you don't statically link to them (ie: use them as DLLs). Though wxWidgets allows you to statically link without becoming GPL'd.
None of the above. If you are making a 3D game, then none of these is good for your needs. The needs of a GUI for a game are very different from the needs of a GUI for a typical desktop application. In a game, you want you particular GUI elements to be consistent with a particular artistic direction, not be consistent with the desktop environment. Plus, you may want your GUI elements to be more expressive than what these toolkits would normally allow.
It is for reasons like this that CEGUI exists. That is a GUI system designed for the needs of a game.
Also, none of these provide input the way a game generally wants to process it. You typically want something lower level for a game than what these toolkits provide. That's why projects like SDL and SFML exist.
1 - Yes, provided that your project doesn't require alteration of the library itself
2 - I strongly reccommend Qt for new windowed apps, if for no other reason than it has excellent documentation (although there are many other winning points, but it gets subjective quite quickly). GTK and WxWidgets will both make you waste mental energy thinking about things you really shouldn't have to think about. Qt is easier to a) customise, and b) ignore when you don't care about customisation.
Although for 3D stuff you might want to look into full-blown engines like, ooh, Irrlicht or Ogre3D or any of a number of others
WxWidgets uses LGPL which means you can dynamically link to it in your project, without it forcing your project to be GPL or LGPL.
However, I suggest using CEGUI instead of the libraries you suggested, for any game or rendering application
CEGUI uses the MIT license which is less strict than LGPL and also allows you to link to the library dynamically (preferred) or statically, both without forcing you to have a specific license for your own project.
Supports OpenGL 3.2+ Core Profile (OpenGL3 Renderer)
Supports very old OpenGL versions (OpenGL Renderer)
If you want to use Ogre or Irrlicht engine, which can also rely on OpenGL, CEGUI also supports these two renderers via the CEGUIOgreRenderer and CEGUIIrrlichtRenderer
Ssupports Windows, Linux and Mac OS X, just as you want
Because someone asked in the comments: Unicode characters are fully supported so that you can use Hebrew, Arabic, all sort of Asian alphabets, etc, as shown in the current Font Demo - of course you need to install either one of the CEGUI fonts or use another Open Source Font
Was specifically designed for games, simulation and rendering applications
You can skin all elements in the UI (currently only via XML, soon also using an editor)
Provides a powerful editor (CEED) for layout editing with WYSIWYG (!) for free!
Is fully extendable and adaptive via changes in C++ code and/or XML
Powerful Event System
It might take a bit to set CEGUI and its dependencies up and get it to run with your project but it will still pay off on the long run because it has a lot more features than most free solutions for UI. Imagine how annoying it would be if you used an UI library and then found out it does not provide a specific feature you need and that it would be almost impossible to add this - because CEGUI is based on C++ and XML and because of its design, you can always add specific adjustments to CEGUI. So you will most likely not run into limitations even on the long run. Also it already has a lot of features out of the box - more than comparable libraries.

Is it possible to embed Qt Assistant as a widget inside my application?

We're running one of our apps on a 8" touch screen and want to add help to it.
Launching Qt Assistant from a menu item works fine for desktop applications, but for touch applications it's far from ideal.
I haven't been able to figure out if it is possible, or permitted to do so?
QAssistant.exe itself seems to come with some license restrictions, but maybe there's another way to do this, like embedding a small web-browser or something.
Have anyone else tackled this, or something similar?
Check out how QtCreator does this, they have integrated QtHelp which looks exactly like what you're trying to do. The library they use for that is the QtHelp module (I think).
You should check the documentation for QHelpEngine and QHelpContentWidget. I think that these classes will meet your needs.
Another way would be to actually see how Qt Assistant is implemented, by looking at the source.

How well are the CSS2 'system colors' supported?

I've been reading the CSS2 spec in my spare time, and I've come across this. The note states that the system colours are deprecated, however, what is the browser support for the system colours part of the spec like?
This feature is deprecated. (it says so at the top of the link you provided)
It is not well supported, and is likely to get less so over time.
The intention of this feature was to provide the browser with access to the colour scheme of the underlying desktop operating system. However it has been dropped for several reasons. Desktop operating systems don't all have the same features, and furthermore the features they do have are open to change.
Finally, the main reason it was dropped is because the underlying reason for having them was to allow site designers to make their sites look like they belong to the parent OS. However there are other, better ways to achieve this now (notwithstanding the fact that most web site designers seem to prefer to have a consistent look and feel to their site that isn't dictated by the user).
See http://www.w3.org/TR/2003/CR-css3-color-20030514/#css-system for up-to-date info on this. At the bottom of this section is the following note:
The CSS2 System Color values have been deprecated in favor of the CSS3 UI 'appearance' property for specifying the complete look of user interface related elements.
That should help tell you where to look for an up-to-date method of achieving a similar result.
The set of colours specified by the W3C in this page is roughly equivalent to the colour scheme values available in Windows 2000. This is obviously of limited use to someone running Windows XP, and no use at all to a Vista or Win7 user, let alone a Mac or Linux user.
i dont know what the support in different browsers for these values looks like, but you can test it for yourself by designing a small page using these, uploading it and testing it with
Browsershot

Does JavaFX have a "native look and feel" option like Swing?

It's been a couple of years since I've done any Java work, my last efforts were using Swing. I'm poking around with a cross-platform client app that will interact with a Rails web service. JavaFX is one of the options I'm considering, but I'm concerned at the out-of-the-box aesthetic. Does JavaFX have a native look and feel option for the JavaFX controls (not Swing)?
I'm getting the impression that if I want to build a line of business application in Java, I should probably stick with Swing which is a shame since I like some of the features of JavaFX like binding, a terse syntax, and easy support for REST client programming.
I haven't see that. At best, you can use the extensive support of CSS styling we got with 1.3 to mimic native look and feel, but that's a big job! Not even sure how to deal with various themes we got on modern systems...
I suppose the point of RIAs is to bring their own look or to be flexible enough to allow to do your own shinny look, not to look like a random bland application on your platform... :-)
(Now, if I like skinnable applications, I also appreciate GUI frameworks using native controls or looking as such, like Qt (vs. GTK+ for example), precisely to provide good old "bland" applications not breaking user experience.)
JavaFX 2.0 has only one Look by default that is called "Caspian".
With Java 8 a second one was introduced, called "Modena".
Both are cross-platform Look&Feels.
See announcement of Modena, with screenshots.
At the moment some developers create native Styles for JavaFX as OpenSource projects. You can find an overview here:
http://www.guigarage.com/2013/01/this-is-for-the-native-ones/
If you are interested in the Mac OS L&F (AquaFX) for JavaFX, here are some posts with previews:
http://www.guigarage.com/category/aquafx/
Native look and feel is not supported by Oracle in the default JavaFX 2.x distribution.
A proof of concept on button styles by one of the JavaFX developers demonstrates that JavaFX is flexible enough to generate widgets that look like native widgets.
For OS X, you can try the third party AquaFX style for JavaFX, which makes JavaFX applications look like native OS X applications. AquaFX appears quite complete and comprehensive to me.
There have been other 3rd party projects which partially create native look and feels for other platforms, but their coverage is currently nowhere near comprehensive.
Some third party projects (all of which seem currently experimental and incomplete) are:
JMetro in jfx-styles
javafx-native-themes (JavaFX look and feels for: default swing, iOS, windows 7...)
you could definitely embed some css in your application to make the javafx components look more like the standard swing look. With scene builder its actually really easy to get all your tags setup correctly.
Check this out
http://docs.oracle.com/javafx/2/css_tutorial/jfxpub-css_tutorial.htm
Interesting thing is in javaFx is, you can give the rich look and feel to native application also.You can apply css to the javaFx components. Not only that you can embed the HTML Css and pages in JAVAFX application.Which i can feel great revolution in terms of UI building for Standalone applications.

Resources