Qt is Mac OS X NativeThis document explains what makes an application native on Mac OS X. It shows the areas where Qt is compliant, and the grey areas where compliance is more questionable. (See also the document Qt for Mac OS X - Specific Issues.) Normally when referring to a native Mac application, one really means an application that talks directly to the underlying window system, rather than one that uses some intermediary (for example Apple's X11 server, or a web browser). Qt applications run as first class citizens, just like Cocoa, and Carbon applications. In fact, we use Carbon and HIView internally to communicate with OS X. When an application is running as a first class citizen, it means that it can interact with specific components of the Mac OS X experience: The Global Menu BarQt does this via the QMenuBar abstraction. Mac users expect to have a menu bar at the top of the screen and Qt honors this. Additionally, users expect certain conventions to be respected, for example the application menu should contain About, Preferences, Quit, etc. Qt handles this automatically, although it does not provide a means of interacting directly with the application menu. (By doing this automatically, Qt makes it easier to port Qt applications to other platforms.) AquaThis is a critical piece of Mac OS X (documentation can be found at http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html). It is a huge topic, but the most important guidelines for GUI design are probably these:
DockInteraction with the dock is possible. The icon can be set by calling QWidget::setWindowIcon() on the main window in your application. The setWindowIcon() call can be made as often as necessary, providing an icon that can be easily updated. AccessiblityAlthough many users never use this, some users will only interact with your applications via assistive devices. With Qt the aim is to make this automatic in your application so that it conforms to accepted practice on its platform. Qt uses Apple's accessibility framework to provide access to users with diabilities. Development ToolsMac OS X developers expect a certain level of interopability between their development toolkit and the platform's developer tools (for example Visual Studio, gmake, etc). Qt supports both Unix style Makefiles, and ProjectBuilder/Xcode project files by using the qmake tool. For example: qmake -spec macx-xcode project.pro will generate an Xcode project file from project.pro. With qmake you do not have to worry about rules for Qt's preprocessors (moc and uic) since qmake automatically handles them and ensures that everything necessary is linked into your application. Qt does not entirely interact with the development environment (for example plugins to set a file to "mocable" from within the Xcode user interface). Nokia is actively working on improving Qt's interoperability with various IDEs. |
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.8 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com