aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Winkelmann <michael.winkelmann@qt.io>2019-10-31 17:47:15 +0100
committerRisto Avila <risto.avila@qt.io>2019-11-18 11:23:14 +0000
commit565e0c0277c6fe1085f47fea69c0961df8fa75ff (patch)
tree9d8d9bb634ad7b87604fde5835030068dbc37e53
parent9ce2ec6f6d5516173cfa97d2dd51df2136524470 (diff)
Add SystemTrayIcon to X11 manual test
Also adds widget dependency because it is required on some platoforms. Change-Id: If699c34bc1b954906fa4a0304387e4f4cab521e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit e5312d19b5579250f0b79a77f7383504d592685d) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
-rw-r--r--tests/manual/x11vkbwrapper/Keyboard.qml12
-rw-r--r--tests/manual/x11vkbwrapper/main.cpp6
-rw-r--r--tests/manual/x11vkbwrapper/x11vkbwrapper.pro2
3 files changed, 16 insertions, 4 deletions
diff --git a/tests/manual/x11vkbwrapper/Keyboard.qml b/tests/manual/x11vkbwrapper/Keyboard.qml
index 1c2fb046..4ead6daf 100644
--- a/tests/manual/x11vkbwrapper/Keyboard.qml
+++ b/tests/manual/x11vkbwrapper/Keyboard.qml
@@ -30,6 +30,7 @@
import QtQuick 2.12
import QtQuick.Window 2.2
import QtQuick.VirtualKeyboard 2.2
+import Qt.labs.platform 1.1
Window {
id: keyboardWindow
@@ -64,6 +65,17 @@ Window {
}
}
+ SystemTrayIcon {
+ id: qtLogo
+ icon {
+ mask: true
+ source: "graphics/Qt_logo.png"
+ }
+ visible: !Qt.inputMethod.visible
+ onActivated: atspiFocus.setKeyboardVisible(!Qt.inputMethod.visible)
+ Component.onCompleted: console.log("Found system tray?:",qtLogo.available)
+ }
+
InputPanel {
id: inputPanel
z: 99
diff --git a/tests/manual/x11vkbwrapper/main.cpp b/tests/manual/x11vkbwrapper/main.cpp
index 6a914792..1bc5408c 100644
--- a/tests/manual/x11vkbwrapper/main.cpp
+++ b/tests/manual/x11vkbwrapper/main.cpp
@@ -27,7 +27,7 @@
**
****************************************************************************/
-#include <QGuiApplication>
+#include <QApplication>
#include <QQmlApplicationEngine>
#include <QDBusConnection>
#include <QtVirtualKeyboard>
@@ -52,9 +52,9 @@ int main(int argc, char *argv[])
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
bool error = false;
- QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
- QGuiApplication app(argc, argv);
+ QApplication app(argc, argv);
/** Setup DBus starts */
auto *extensionHandler = new HandleDbusForChrome(&app);
diff --git a/tests/manual/x11vkbwrapper/x11vkbwrapper.pro b/tests/manual/x11vkbwrapper/x11vkbwrapper.pro
index 6dc7226f..04978156 100644
--- a/tests/manual/x11vkbwrapper/x11vkbwrapper.pro
+++ b/tests/manual/x11vkbwrapper/x11vkbwrapper.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = x11vkbwrapper
-QT += qml quick dbus virtualkeyboard svg
+QT += qml quick dbus virtualkeyboard svg widgets
CONFIG += c++11
static {