To associate a cursor with a widget, use QWidget::setCursor(). To
associate a cursor with all widgets (normally for a short period
- of time), use QApplication::setOverrideCursor().
+ of time), use QGuiApplication::setOverrideCursor().
To set a cursor shape use QCursor::setShape() or use the QCursor
constructor which takes the shape as argument, or you can use one
methods QCursor::pos() and QCursor::setPos().
\bold{Note:} It is possible to create a QCursor before
- QApplication, but it is not useful except as a place-holder for a
- real QCursor created after QApplication. Attempting to use a
- QCursor that was created before QApplication will result in a
+ QGuiApplication, but it is not useful except as a place-holder for a
+ real QCursor created after QGuiApplication. Attempting to use a
+ QCursor that was created before QGuiApplication will result in a
crash.
\section1 A Note for X11 Users
static bool qt_detectRTLLanguage()
{
return force_reverse ^
- (QApplication::tr("QT_LAYOUT_DIRECTION",
+ (QCoreApplication::tr("QT_LAYOUT_DIRECTION",
"Translate this string to the string 'LTR' in left-to-right"
" languages or to 'RTL' in right-to-left languages (such as Hebrew"
" and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
{
if (QGuiApplicationPrivate::qt_clipboard == 0) {
if (!qApp) {
- qWarning("QApplication: Must construct a QApplication before accessing a QClipboard");
+ qWarning("QGuiApplication: Must construct a QGuiApplication before accessing a QClipboard");
return 0;
}
QGuiApplicationPrivate::qt_clipboard = new QClipboard(0);
{
Q_OBJECT
Q_DECLARE_PRIVATE(QSessionManager)
- QSessionManager(QApplication *app, QString &id, QString &key);
+ QSessionManager(QGuiApplication *app, QString &id, QString &key);
~QSessionManager();
public:
QString sessionId() const;
{
}
-QSessionManager::QSessionManager(QApplication *app, QString &id, QString &key)
+QSessionManager::QSessionManager(QGuiApplication *app, QString &id, QString &key)
: QObject(*(new QSessionManagerPrivate(this, id, key)), app)
{
Q_D(QSessionManager);
<< (bool)(enabledShortcuts>1) << ") to object(" << next->owner << ')';
#endif
QShortcutEvent se(next->keyseq, next->id, enabledShortcuts>1);
- QApplication::sendEvent(const_cast<QObject *>(next->owner), &se);
+ QCoreApplication::sendEvent(const_cast<QObject *>(next->owner), &se);
}
/* \internal
windowSystemEventQueue.append(ev);
queueMutex.unlock();
- QAbstractEventDispatcher *dispatcher = QApplicationPrivate::qt_qpa_core_dispatcher();
+ QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::qt_qpa_core_dispatcher();
if (dispatcher)
dispatcher->wakeUp();
}