qtcreator-faq.qdoc 11.9 KB
Newer Older
Leena Miettinen's avatar
Leena Miettinen committed
1
2
3
4
/****************************************************************************
**
** This file is part of Qt Creator
**
5
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
Leena Miettinen's avatar
Leena Miettinen committed
6
**
7
** Contact: Nokia Corporation (qt-info@nokia.com)
Leena Miettinen's avatar
Leena Miettinen committed
8
9
10
11
12
13
14
15
16
17
**
**
** GNU Free Documentation License
**
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of this
** file.
**
** If you have questions regarding the use of this file, please contact
18
** Nokia at qt-info@nokia.com.
Leena Miettinen's avatar
Leena Miettinen committed
19
20
21
**
****************************************************************************/

Leena Miettinen's avatar
Leena Miettinen committed
22
23
/*!
    \contentspage index.html
24
    \previouspage creator-help.html
Leena Miettinen's avatar
Leena Miettinen committed
25
    \page creator-faq.html
26
    \nextpage creator-tips.html
Leena Miettinen's avatar
Leena Miettinen committed
27
28
29

    \title FAQ

30
31
    This section contains answers to some frequently asked questions about \QC.
    You might also find answers to your questions in the
Leena Miettinen's avatar
Leena Miettinen committed
32
33
34
35
36
37
    \l{Known Issues} and \l{Tips and Tricks} sections, or the Troubleshooting
    sections for a special area, such as
    \l{Troubleshooting Debugger}{debugging}.

    \section1 General Questions

38
    \bold {How do I reset all \QC settings?}
Leena Miettinen's avatar
Leena Miettinen committed
39

40
    \QC creates the following files and directories:
Leena Miettinen's avatar
Leena Miettinen committed
41
42
43
44
45
46
47

    \list

        \o  QtCreator.db

        \o  QtCreator.ini

Leena Miettinen's avatar
Leena Miettinen committed
48
49
50
51
        \o  qtversion.xml

        \o  toolChains.xml

Leena Miettinen's avatar
Leena Miettinen committed
52
53
        \o  qtcreator

54
55
56
57
58
59
60
61
        \o  qtc-debugging-helper

        \o  qtc-qmldbg

        \o  qtc-qmldump

        \o  qtc-qmlobserver

Leena Miettinen's avatar
Leena Miettinen committed
62
63
    \endlist

64
65
66
67
68
    The location depends on the platform. On Linux and other Unix platforms, the files
    are located in \c {~/.config/Nokia} and \c {~/.local/share/data/Nokia/qtcreator}.

    On Mac OS, the files are located in \c {~/.config/Nokia} and
    \c {~/Library/Application Support/Nokia/Qt Creator}.
Leena Miettinen's avatar
Leena Miettinen committed
69
70

    On Windows XP, the files are located in
71
72
73
74
75
76
    \c {<drive>:\Documents and Settings\<username>\Application Data\Nokia} and
    \c {<drive>:\Documents and Settings\<username>\Local Settings\Application Data\Nokia}.

    On Windows Vista and Windows 7, the files are located in
    \c {<drive>:\Users\<username>\AppData\Roaming\Nokia} and
    \c {<drive>:\Users\<username>\AppData\Local\Nokia}.
Leena Miettinen's avatar
Leena Miettinen committed
77

78
    \bold {\QC comes with MinGW, should I use this version with Qt?}
Leena Miettinen's avatar
Leena Miettinen committed
79
80
81

    Use the version that was built against the Qt version.

82
    \bold {\QC does not find a helper application, such as Git or a
Leena Miettinen's avatar
Leena Miettinen committed
83
84
    compiler. What should I do?}

85
86
    Make sure that the application is in your system PATH when starting \QC.
    Also select \gui {Tools > Options} to check the settings specified
Leena Miettinen's avatar
Leena Miettinen committed
87
88
89
90
    for the application. Many plugins specify either the path to the tool they
    need or the environment they run in.

    This is especially relevant for the Mac OS where \c {/usr/local/bin} might
91
    not be in the path when \QC is started.
Leena Miettinen's avatar
Leena Miettinen committed
92

93
    \bold {How do I change the interface language for \QC?}
Leena Miettinen's avatar
Leena Miettinen committed
94

95
    \QC has been localized into several languages. If the system
Leena Miettinen's avatar
Leena Miettinen committed
96
97
98
    language is one of the supported languages, it is automatically selected.
    To change the language, select \gui {Tools > Options > Environment} and
    select a language in the \gui Language field. The change takes effect after
99
    you restart \QC.
Leena Miettinen's avatar
Leena Miettinen committed
100
101
102
103

    \bold {Has a reported issue been addressed?}

    You can look up any issue in the
104
    \l{https://bugreports.qt-project.org/}{Qt bug tracker}.
Leena Miettinen's avatar
Leena Miettinen committed
105

106
107
108
    \if defined(qcmanual)
    \input widgets/creator-faq-qtdesigner.qdocinc
    \endif
Leena Miettinen's avatar
Leena Miettinen committed
109
110
111
112
113
114

    \section1 Help Questions

    \bold {The Qt API Reference Documentation is missing and context help does
    not find topics. What can I do?}

115
    \QC comes fully integrated with Qt documentation and examples using
Leena Miettinen's avatar
Leena Miettinen committed
116
    the Qt Help plugin. The integrated Qt Reference Documentation is available
117
    for Qt 4.4 and later. \QC, \QSDK, and other Qt deliverables contain
Leena Miettinen's avatar
Leena Miettinen committed
118
119
120
121
    documentation as .qch files. All the documentation is accessible in the
    \gui Help mode.

    To view the documentation that is available and to add documentation,
122
    select \gui {Tools > Options > Help > Documentation}. For more
Leena Miettinen's avatar
Leena Miettinen committed
123
124
125
126
127
128
129
130
131
132
    information, see \l{Adding External Documentation}.

    \section1 Debugger Questions

    For information on troubleshooting debugger, see
    \l{Troubleshooting Debugger}.

    \bold {If I have a choice of GDB versions, which should I use?}

    On Linux and Windows, use the Python-enabled GDB versions that are
133
    installed when you install \QC and Qt SDK. On Mac OS X, use the GDB
Leena Miettinen's avatar
Leena Miettinen committed
134
135
136
137
138
139
140
141
142
    provided with Xcode. For a custom target, you can build your own
    Python-enabled GDB. Follow the instructions in
    \l{http://developer.qt.nokia.com/wiki/QtCreatorBuildGdb}{Building GDB}.

    You must use at least Python version 2.5, but we recommend that you use
    version 2.6.

    For more information on setting up debugger, see \l{Setting Up Debugger}.

143
    \bold {How do I generate a core file in \QC?}
144
145
146
147
148
149
150
151
152
153
154

    To trigger the GDB command that generates a core file while debugging,
    select \gui {Window > Views > Debugger Log}. In the \gui Command field,
    type \c gcore and press \key Enter. The core file is created in the
    current working directory. You can specify another location for the file,
    including a relative or absolute path, as an argument of the command.

    To generate a temporary core file, select \gui {Create Snapshot} in the
    context menu in the \gui Snapshot view. The core file is deleted when you
    stop debugging.

Leena Miettinen's avatar
Leena Miettinen committed
155
156
157
158
159
160
161
162
163
    \section1 Code Editor Questions

    \bold {How can I get code-completion to work on the standard headers and
    phonon?}

    Install a build from March 31, 2009, or later.

    \section1 Compiler Questions

164
    \bold {How can I make use of my multi-core CPU with \QC?}
Leena Miettinen's avatar
Leena Miettinen committed
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203

    On Linux and Mac OS X, go to \gui Project mode, select your configuration
    in the \gui {Build Settings}, locate the \gui {Build Steps}, and add the
    following value, where \c{<num>} is the amount of cores in your CPU:
    \c{-j <num>}

    On Windows, nmake does not support the \c{-j} parameter. Instead, we
    provide a drop-in replacement called jom. You can download a precompiled
    version of jom from \l{ftp://ftp.qt.nokia.com/jom/}{Qt FTP server}.
    Put jom.exe in a location in the %PATH%. Go to the \gui {Build Settings}
    and set jom.exe as the make command.

    \note: Unlike GNU make, jom automatically detects your cores and spawns as
    many parallel processes as your CPU has cores. You can override this
    behavior by using the \c{-j} parameter as described above.

    \section1 Qt SDK Questions

    \bold {I cannot use QSslSocket with the SDK. What should I do?}

    The Qt build in the SDK is built with QT_NO_OPENSSL defined. Rebuilding it
     is possible. For more information, see
     \l{http://www.qtcentre.org/forum/f-qt-programming-2/t-qssl-19222-post94842.html}.

    \bold {Which development packages from the distribution are needed on
    Ubuntu or Debian?}

    \code
    sudo apt-get install libglib2.0-dev libSM-dev libxrender-dev libfontconfig1-dev libxext-dev
    \endcode

    If you use QtOpenGL, you also need:

    \code
    sudo apt-get install libgl-dev libglu-dev
    \endcode

    \section1 Platform Releated Questions

204
    \bold {Where is application output shown in \QC?}
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220

    \bold {On Unix (Linux and Mac OS):} \c qDebug() and related functions use
    the standard output and error output. When you run or debug the
    application, you can view the output in the \gui{Application Output} pane.

    For console applications that require input, select \gui {Projects > Run
    Settings > Run in terminal}.

    \bold {On Windows:} Output is displayed differently for \e{console
    applications} and \e{GUI applications}.

    The setting \c {CONFIG += console} in the .pro file specifies that the
    application is built as a console application using some other runtime.
    When you run a console application, you can view the output in the console
    window of the calling application. If the
    calling application is a GUI application (for example, a release-built
221
    version of \QC), a new console window is opened.  For this
222
223
224
225
226
227
228
229
230
231
232
233
234
235
    type of application, \c qDebug() and related functions use standard output
    and error output.

    We recommend that you select \gui {Projects > Run Settings > Run in
    terminal} for console applications.

    For GUI applications, \c qDebug() and related functions use the Windows API
    function \c OutputDebugString(). The output is displayed in the
    \gui{Application Output} pane. However, only one output pane tab may be
    open at a time or the output is not displayed correctly. You can use an
    external debug output viewer, such as the
    \l{http://technet.microsoft.com/en-us/sysinternals/bb896647}{DebugView for Windows}
    to display output from GUI applications.

236
237
238
    \if defined(qcmanual)
    \input symbian/creator-faq-debug-output-symbian.qdocinc
    \endif
Leena Miettinen's avatar
Leena Miettinen committed
239
240
241
242
243
244
245
246
247
248

    \section1 Questions about New Features

    \bold {Will a requested feature be implemented?}

    If it is a scheduled feature, you can see this in the task tracker. If a
    feature already has been implemented, it is mentioned in the
    \l{http://qt.gitorious.org/qt-creator/qt-creator/trees/master/dist}{changes file}
    for the upcoming release.

249
    \bold {Why does \QC not use tabs for editors?}
Leena Miettinen's avatar
Leena Miettinen committed
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283

    This question comes up from time to time, so we have considered it
    carefully. Here are our main reasons for not using tabs:

    \list

        \o  Tabs do not scale. They work fine if you have 5 to 6 editors open,
            they become cumbersome with 10, and if you need more horizontal
            space than the tab bar, the interface does not work at all.

        \o  Tabs do not adapt to your working set.

        \o  The common solution is to give the user the ability to reorder
            tabs. Now user has to manage tabs instead of writing code.

        \o  Tabs force you to limit the amount of open editors, because
            otherwise you get confused.

    \endlist

    Consider the following use case: \e {Developers want to switch editors.}

    In fact, developers do not want to switch editors, but might have to do so
    to accomplish their tasks. We need to figure out what the tasks are to
    provide developers with better ways to navigate while performing the tasks.

    One common factor in many use cases is switching editors while working on a
    set of open files. While working on files A and B, users sometimes need to
    look at file C. They can press \key Ctrl+Tab to move between the files and
    have the files open in the correct editor according to file type. The list
    is sorted by last used.

    Typically, users also work on multiple classes or functions that are
    related, even though they are defined or declared in different files.
284
    \QC provides two shortcuts for that: \key F2 to follow the symbol
Leena Miettinen's avatar
Leena Miettinen committed
285
286
287
288
289
290
291
292
293
294
    and \key Ctrl+Shift+U to find usages.

    In addition, developers can:

    \list

        \o  Press \key F4 to switch between header and source.

        \o  Press \key Alt+Left to move backwards in the navigation history.

295
        \o  Use the locator (Ctrl+K) to simply tell \QC where to go.
Leena Miettinen's avatar
Leena Miettinen committed
296
297
298
299
300
301
302
303
304
305
306
307
308
309

    \endlist

    The locator can be used to open files, but opening files is also just a
    step on the way to accomplish a task. For example, consider the following
    use case: \e {Fix AMethod in SomeClass which comes from
    someclass.cpp/someclass.h}.

    With a tabbed user interface, developers would search for someclass.cpp in
    the tab bar, and then search for \c {::AMethod}, only to find out that the
    method is not located in that file. They would then search for someclass.h
    in the tab bar, find our that the function is inline, fix the problem, and
    forget where they came from.

310
    With \QC, developers can type \c {Ctrl+K m AMet} to find the method.
Leena Miettinen's avatar
Leena Miettinen committed
311
312
313
314
315
316
317
318
    Typically, they only need to type 3 to 4 characters of the method name.
    They can then fix the problem and press \key Alt+Back to go back to where
    they were.

    Other locator filters include \c c for classes, \c : for all symbols, and
    (thanks to a community contribution) \c . for symbols in the current file.

*/