summaryrefslogtreecommitdiffstats
path: root/doc/src/classes/exportedfunctions.qdoc
blob: 6675f248943df147312b4ff2b3d674d1083d775c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights.  These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \page exportedfunctions.html
    \title Platform-Specific Functions
    \ingroup funclists

    \brief Exported functions for fine tuning Qt applications.

    Qt provides a few low-level global functions for fine-tuning
    applications. Most of these perform very specific tasks and are
    platform-specific. In general, we recommend that you try using
    Qt's public API before resorting to using any functions mentioned
    here.

    These functions are exported by \l QtCore and \l QtGui, but most
    of them aren't declared in Qt's header files. To use them in your
    application, you must declare them before calling them. For
    example:

    \snippet doc/src/snippets/code/doc_src_exportedfunctions.qdoc 0

    These functions will remain as part of Qt for the lifetime of Qt
    4.

    Functions:

    \tableofcontents

    \section1 void qt_set_library_config_file(const QString &\e{fileName})

    Specifies the location of the Qt configuration file. You must
    call this function before constructing a QApplication or
    QCoreApplication object. If no location is specified, Qt
    automatically finds an appropriate location.

    \section1 void qt_set_sequence_auto_mnemonic(bool \e{enable})

    Specifies whether mnemonics for menu items, labels, etc., should
    be honored or not. On Windows and X11, this feature is
    on by default; on Mac OS X, it is off. When this feature is off,
    the QKeySequence::mnemonic() function always returns an empty
    string. This feature is also enabled on embedded Linux.

    \section1 void qt_x11_wait_for_window_manager(QWidget *\e{widget})

    Blocks until the X11 window manager has shown the widget after a
    call to QWidget::show().

    \section1 void qt_mac_secure_keyboard(bool \e{enable})

    Turns the Mac OS X secure keyboard feature on or off. QLineEdit
    uses this when the echo mode is QLineEdit::Password or
    QLineEdit::NoEcho to guard the editor against keyboard sniffing.
    If you implement your own password editor, you might want to turn
    on this feature in your editor's
    \l{QWidget::focusInEvent()}{focusInEvent()} and turn it off in
    \l{QWidget::focusOutEvent()}{focusOutEvent()}.

    \section1 void qt_mac_set_dock_menu(QMenu *\e{menu})

    Sets the menu to display in the Mac OS X Dock for the
    application. This menu is shown when the user attempts a
    press-and-hold operation on the application's dock icon or
    \key{Ctrl}-clicks on it while the application is running.

    The menu will be turned into a Mac menu and the items added to the default
    Dock menu. There is no merging of the Qt menu items with the items that are
    in the Dock menu (i.e., it is not recommended to include actions that
    duplicate functionality of items already in the Dock menu).

    \section1 void qt_mac_set_menubar_icons(bool \e{enable})

    Specifies whether icons associated to menu items for the
    application's menu bar should be shown on Mac OS X. By default,
    icons are shown on Mac OS X just like on the other platforms.

    In Qt 4.4, this is equivalent to
    \c { QApplication::instance()->setAttribute(Qt::AA_DontShowIconsInMenus); }.

    \section1 void qt_mac_set_menubar_merge(bool \e{enable})

    Specifies whether Qt should attempt to relocate standard menu
    items (such as \gui Quit, \gui Preferences, and \gui About) to
    the application menu on Mac OS X. This feature is on by default.
    See \l{Qt for Mac OS X - Specific Issues} for the list of menu items for
    which this applies.

    \section1 void qt_mac_set_native_menubar(bool \e{enable})

    Specifies whether the application should use the native menu bar
    on Mac OS X or be part of the main window. This feature is on by
    default.

    In Qt 4.6, this is equivalent to
    \c { QApplication::instance()->setAttribute(Qt::AA_DontUseNativeMenuBar); }.

    \section1 void qt_mac_set_press_and_hold_context(bool \e{enable})

    Turns emulation of the right mouse button by clicking and holding
    the left mouse button on or off. This feature is off by default.
*/