Make your Qt desktop program look more native (1): Introduction

Source: Internet
Author: User

Making your Qt desktop program look more native is a series of articles. In this series, you will learn how to make your Qt desktop application look more native. Here, I suppose you know how to use Qt to write desktop applications, because most of the articles are called "details", and sometimes these "details" determine the user experience. At the same time, the program here refers to the desktop program, excluding various embedded platforms.

The introduction of Qt is not described here. Here we only show that, compared with other C ++ UI libraries, Qt processing is actually more similar to Java's Swing. Most components of Qt are drawn by their own drawing system, which determines that the efficiency of Qt is not as high as that of MFC or wxWidgets. At the same time, it is precisely because of this that the desktop program of Qt sometimes looks not so native.

The so-called native is also called "native" here ". Any desktop, Windows, GNOME, KDE, and MacOS have their own unique styles. This style is called native. Generally, the most native way to obtain a window is to call the system's own functions. For example, to create a window using win32 API on Windows, this window must be native. Similarly, you can use Gnome or KDE APIs to obtain a native window. The layout of window components on each platform is also different. In Windows, the Help on the menu always appears in the adjacent positions of other menu items, and the rightmost of the menu bar is usually blank. However, on MacOS, the Help menu appears at the rightmost of the menu bar, and there will be a large gap between the Help menu and other menus. This is the difference between the native style of the two platforms. If your program is only written in the style on the Windows platform, MacOS users will think that the program is very handy. This is insufficient for a truly cross-platform program.

Now we have explained that the work of this series is to make the Qt desktop program have the same effect as the native program in Windows, GNOME, KDE, and MacOS. Of course, sometimes this goal is hard to achieve. Therefore, we just want to work towards it.

Before starting the text, we should know that, in fact, each platform has its own interface design guide, telling you on this platform, determine who is in front of the button and the cancel button, what is the common font and number of characters in an application. These guidance documents can be found online. We will list them for your reference below:

Windows: Windows User Experience Interaction guide Windows User Experience Interaction Guidelines)

Apple: Apple user Interface guide Apple Human Interface Guidelines)

GNOME: GNOME User Interface Guide GNOME Human Interface Guidelines)

KDE: KDE User Interface Guide KDE User Interface Guidelines)

This article is from the "bean space" blog, please be sure to keep this source http://devbean.blog.51cto.com/448512/455917

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.