Skip to content

Mobile and Embedded

The forum for developing everything embedded: Linux, WinCE, Symbian, MeeGo... you name it.
14.2k Topics 62.9k Posts
  • 0 Votes
    2 Posts
    77 Views
    Axel SpoerlA
    Hi and welcome to the Qt Forum, touch handling has been refactored in Qt 6, and 5.12 has been EOL for a long time. Please upgrade to a newer Qt Version, preferably >= 6.5.
  • QTextEdit goes underneath android keyboard when editing

    Solved
    5
    0 Votes
    5 Posts
    260 Views
    B
    I've found a workaround - since the QTextEdit initially is the correct size when I open the keyboard, I can call setMaximumHeight(this->size().height()), which prevents it from growing vertically on these other events. In other words, for a QTextEdit* editor, you would: QTextEdit* editor = /* anything here, or if you're using this inside a QTextEdit subclass, use "this" instead... */; QApplication* app = (QApplication*) (QApplication::instance()); QObject::connect(app->inputMethod(), &QInputMethod::keyboardRectangleChanged, [&]() { if (app->inputMethod()->keyboardRectangle().height() == 0) // keyboard is closed editor->setMaximumHeight(QWIDGETSIZE_MAX); else // keyboard is open, limit maximum vertical height editor->setMaximumHeight(editor->height()); }); This happens to work for my use case, but might fail others...
  • meta-qt6 static build - eglfs - Qt6::EglFSDeviceIntegrationPrivate not found

    Unsolved
    1
    0 Votes
    1 Posts
    67 Views
    No one has replied
  • Android install APK for Update

    Unsolved
    1
    0 Votes
    1 Posts
    84 Views
    No one has replied
  • boot time optimisation references b2qt i.MX 8X

    Unsolved
    1
    0 Votes
    1 Posts
    55 Views
    No one has replied
  • 0 Votes
    1 Posts
    108 Views
    No one has replied
  • android cmakelists project won't load on new build machine

    Unsolved
    4
    0 Votes
    4 Posts
    231 Views
    SGaistS
    Hi, The most pragmatic answer is: don't. Follow the recommendation given in the Qt For Androïd documentation for the versions of the JDK and NDK to use.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • QT 5.15 egl_kms Layering with kmssink [panfrost]

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    K
    @raphael_openhd Hello! I'm installing QOpenHD on an RK3588 (Orange Pi 5+). Ubuntu jammi. Could you please tell me how to correct do this?
  • [SOLVED] Qt6 crosscompiled for pi4 raspi os 64 FAILED TO CREATE EGL CONTEXT

    Solved
    13
    1 Votes
    13 Posts
    3k Views
    SGaistS
    Did you check whether you have somewhere in your environnement something that sets the QPA platform to wayland ?
  • Deployment AVD cannot be started

    Unsolved
    2
    0 Votes
    2 Posts
    571 Views
    P
    I had this same problem on linux. It was due to avdmanager creates the avds in different folder than what emulator expects. So what I did was created link of avd directory from '~/.config/.android/avd' to '~/.android/avd' and it worked. May be there's similar issue with you.
  • How to disable screensaver on Qt6.9.1 Android App

    Unsolved
    17
    0 Votes
    17 Posts
    3k Views
    X
    I think the missing link might be that the addFlags call wasn't happening in the Android main thread, in my case I have a QML application so I created a C++ QObject called ScreenOnKeeper with a single boolean property called enabled, so the QML side creates an instance of ScreenOnKeeper and sets its enabled property to true to keep the screen on (or false to allow the screen to turn off again), and below is what I have in the write method for that property: void ScreenOnKeeper::setEnabled(const bool yes) { #ifdef ANDROID QNativeInterface::QAndroidApplication::runOnAndroidMainThread([yes]() { QJniObject activity = QNativeInterface::QAndroidApplication::context(); if(activity.isValid()) { QJniObject window = activity.callObjectMethod("getWindow", "()Landroid/view/Window;"); if (window.isValid()) { // if getting the flag dynamically fails use the constant 128 // from https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON int keep_screen_on_flag = QJniObject::getStaticField<int>("android/view/WindowManager$LayoutParams", "FLAG_KEEP_SCREEN_ON"); window.callMethod<void>(yes ? "addFlags" : "clearFlags", keep_screen_on_flag); } } }).waitForFinished(); #endif m_enabled = yes; emit enabledChanged(); } The main difference between this and the code snippets you've posted is that the QJniObject stuff is all contained in a function given to QNativeInterface::QAndroidApplication::runOnAndroidMainThread(), for me this works on both the emulator with Android 16 as well as a Samsung Galaxy A26 with One UI 8.0 (based on Android 16 as well). I am using Qt 6.10.1 though, not sure if any of the relevant syntax has changed between that and 6.9.x.
  • Does the mobile terminal not support static compilation of Qt libraries?

    Unsolved
    3
    0 Votes
    3 Posts
    162 Views
    SGaistS
    Hi, Static builds require extra steps with regards to plugins. See the static plugins howto.
  • cmake fails for Qt 6.10.1 build for android

    Solved
    4
    0 Votes
    4 Posts
    176 Views
    msauer751M
    @Axel-Spoerl Hi Axel, merry christmas, too. I forgot to include find_package(Qt6 COMPONENTS Widgets REQUIRED) in the main function. Now it works. BR Martin
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    97 Views
    No one has replied
  • Problem with implementing some streaming, QML, CPP

    Unsolved
    10
    0 Votes
    10 Posts
    477 Views
    V
    // Main.qml import QtCore import QtMultimedia import QtQuick import QtQuick.Controls import VWC 1.0 ApplicationWindow { width: Screen.width height: Screen.height visible: true title: qsTr("VWC: Virtual Web Camera") Switch { id: toggleCameraSwtich onCheckedChanged: { if (checked) { videoOutput.visible = true Controller.cameraStart() } else { Controller.cameraStop() videoOutput.visible = false } } } VideoOutput { id: videoOutput anchors.fill: parent Component.onCompleted: { Controller.setVideoOutput(videoOutput) } } CameraPermission { id: permissionController Component.onCompleted: { if (permissionController.status !== Qt.PermissionStatus.Granted) { permissionController.request() } } } } // Controller.h class Controller : public QObject { Q_OBJECT public: explicit Controller(QObject *parent = nullptr); Q_INVOKABLE void setVideoOutput(QObject* videoOutput); Q_INVOKABLE void cameraStart(); Q_INVOKABLE void cameraStop(); signals: public slots: private: QMediaCaptureSession* captureSession; QCamera* camera; }; // main.cpp int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; Controller* controller = new Controller{&app}; qmlRegisterSingletonInstance("VWC", 1, 0, "Controller", controller); QObject::connect( &engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.loadFromModule("VWC", "Main"); return app.exec(); } I need to get frames from QCamera in the same time when stream is turned on. How?
  • Android need Broadcast Receiver for Zebra Scanner

    Unsolved
    1
    1 Votes
    1 Posts
    113 Views
    No one has replied
  • Boot2Qt 6.4 Deployment Error: drmModeGetResources failed & QML "Constants" issues

    Unsolved
    2
    0 Votes
    2 Posts
    196 Views
    L
    Imports in QML match the module URI exactly. Once the module is properly deployed, the error disappears. https://forum.qt.io/topic/162691/mediaplayer-videooutput-sigsegv-gst_v4l2_object_fill_format_listmsn games
  • 0 Votes
    5 Posts
    2k Views
    A
    I'm facing some issues trying to build QGC v4.3 to Android. [image: 6261370c-6d88-4092-ac3d-4926f5e6b196.png] I've checked into Android SDK folder names and versions, everything is ok. Take a loook: [image: 368ef3b2-fb3a-439a-9010-769743691d5f.png] And that's my Qt Creator SDKs setup: [image: 9918adc9-ac7d-48c6-bc3c-d999fa44bf3d.png] QtCreator version 18.0.0 Windows 10 I've tried delete Android SDK folder Reinstall JDK11 Update Qt Creator Delete cmdline-tools folder from Android SDK Any help is appreciated!
  • Jetson - embedding hardware decoded video stream into Qt

    Unsolved
    4
    0 Votes
    4 Posts
    394 Views
    mrdebugM
    https://github.com/denisgottardello/QtFFmpegPlayer Works on Qt5 and 6, play a remote file, rtsp, webcam etc. It is based on ffmpeg library and, as explained above, the gpu usage is related at the size and definition of the stream.