Skip to content

Mobile and Embedded

The forum for developing everything embedded: Linux, WinCE, Symbian, MeeGo... you name it.
14.2k Topics 62.8k Posts
  • [SOLVED] Qt6 crosscompiled for pi4 raspi os 64 FAILED TO CREATE EGL CONTEXT

    Solved
    13
    1 Votes
    13 Posts
    2k 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
    399 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
    2k 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
    111 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
    103 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
  • Help Needed: Android Qt Testers

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

    Unsolved
    10
    0 Votes
    10 Posts
    398 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
    66 Views
    No one has replied
  • Boot2Qt 6.4 Deployment Error: drmModeGetResources failed & QML "Constants" issues

    Unsolved
    2
    0 Votes
    2 Posts
    132 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
  • android cmakelists project won't load on new build machine

    Unsolved
    1
    0 Votes
    1 Posts
    90 Views
    No one has replied
  • 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
    301 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.
  • Video in eglfs mode much slower than ffmpeg directly to fb

    Unsolved
    2
    0 Votes
    2 Posts
    180 Views
    L
    The Qt version is 6.8.3. The app is built in Release mode. Here's the content of Main.qml: import QtQuick import QtQuick.Controls.Basic import QtMultimedia Window { width: 1024 height: 600 visible: true title: qsTr("Hello World") Button { id: btnPlay text: "Play" x: 10 y: 10 width: 100 height: 50 onClicked: { console.log("Play!") if (vid.playbackState === MediaPlayer.PlayingState) { vid.pause(); } else { vid.play(); } } } Video { id:vid visible: true enabled: false x: 70 y: 70 //Set to same as video width: 768 height: 450 source: "qrc:/path/to/vid.avi" muted: true autoPlay: false loops: MediaPlayer.Infinite onErrorChanged: console.log("Video error occurred: ", errorString, "(", error, ")") } } Here's the output of ffmpeg: # ./ffmpeg -re -i /path/to/vid.avi -pix_fmt rgb565 -f fbdev /dev/fb0 ffmpeg version N-121955-g413346bd06 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 13.4.0 (GCC) configuration: --enable-cross-compile --target-os=linux --arch=armv7l --prefix=/path/to/build --extra-cflags=-I/path/to/build/include --extra-ldflags=-L/path/to/build/lib --extra-libs=-lpthread --extra-libs=-lm --bindir=/path/to/bin --enable-gpl --enable-nonfree --disable-x86asm --disable-asm --cc='arm-dey-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=/opt/dey/5.0-r2/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi' --strip=arm-dey-linux-gnueabi-strip libavutil 60. 19.101 / 60. 19.101 libavcodec 62. 21.100 / 62. 21.100 libavformat 62. 6.103 / 62. 6.103 libavdevice 62. 2.100 / 62. 2.100 libavfilter 11. 10.101 / 11. 10.101 libswscale 9. 3.100 / 9. 3.100 libswresample 6. 2.100 / 6. 2.100 Input #0, avi, from '/path/to/vid.avi': Metadata: software : VLC Media Player - 3.0.21 Vetinari Duration: 00:00:23.87, start: 0.000000, bitrate: 1224 kb/s Stream #0:0: Video: msmpeg4v2 (DIV2 / 0x32564944), yuv420p, 768x456, 1224 kb/s, 15 fps, 15 tbr, 15 tbn Stream mapping: Stream #0:0 -> #0:0 (msmpeg4v2 (native) -> rawvideo (native)) Press [q] to stop, [?] for help [vist#0:0/msmpeg4v2 @ 0x46dee80] Resumed reading at pts 0.000 with rate 1.050 after a lag of 0.500s [swscaler @ 0xb520c080] No accelerated colorspace conversion found from yuv420p to rgb565le. [swscaler @ 0xb520c080] [swscaler @ 0xb5219280] No accelerated colorspace conversion found from yuv420p to rgb565le. [swscaler @ 0xb520c080] [swscaler @ 0xb5226220] No accelerated colorspace conversion found from yuv420p to rgb565le. [swscaler @ 0xb520c080] [swscaler @ 0xb52331c0] No accelerated colorspace conversion found from yuv420p to rgb565le. Output #0, fbdev, to '/dev/fb0': Metadata: software : VLC Media Player - 3.0.21 Vetinari encoder : Lavf62.6.103 Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le(pc, gbr/unknown/unknown, progressive), 768x456, q=2-31, 84044 kb/s, 15 fps, 15 tbn Metadata: encoder : Lavc62.21.100 rawvideo [out#0/fbdev @ 0x46e1b40] video:59508KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 87 fps= 16 q=-0.0 Lsize=N/A time=00:00:05.80 bitrate=N/A speed=1.05x elapsed=0:00:05.53 And here's the output of the Qt app: # LD_LIBRARY_PATH="/opt/Qt/lib" QT_PLUGIN_PATH="/opt/Qt/plugins" QML2_IMPORT_PATH="/opt/Qt/lib/qml" QT_QPA_PLATFORM=eglfs /path/to/app Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8. Qt depends on a UTF-8 locale, but has failed to switch to one. If this causes problems, reconfigure your locale. See the locale(1) manual for more information. Failed to move cursor on screen HDMI1: -14 Failed to move cursor on screen HDMI1: -14 xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb Failed to create xkb context qt.multimedia.ffmpeg: Using Qt multimedia with FFmpeg version 6.1.2 LGPL version 2.1 or later Input #0, avi, from '/tmp/appIS3.OpUgoR.avi': Metadata: software : VLC Media Player - 3.0.21 Vetinari Duration: 00:00:23.87, start: 0.000000, bitrate: 1224 kb/s Stream #0:0: Video: msmpeg4v2 (DIV2 / 0x32564944), yuv420p, 768x456, 1224 kb/s, 15 fps, 15 tbr, 15 tbn qml: Play! qt.multimedia.playbackengine.codec: "No HW decoder found"
  • Build errors in QGC for android due to JDK.

    Moved Unsolved
    5
    0 Votes
    5 Posts
    854 Views
    K
    I resolved this by locating the required files in their various directories and copying them into the paths where they were expected.
  • Development about Head-Up Display (HUD)

    Unsolved
    3
    0 Votes
    3 Posts
    180 Views
    Z
    @Xenosb Thank you for your answer.
  • Android X86_64 App crashes before reaching Qt main.

    Solved
    13
    0 Votes
    13 Posts
    2k Views
    RokeJulianLockhartR
    F/libc : crash_dump helper failed to exec, or was killed @SMF-Qt, about that, follow stackoverflow.com/q/77202603.
  • help

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    Andy314A
    What do you means with responsive ? Adaption of the GUI to Screenorientation resp. - Screen Resolution and Size ? (Responsive Design)
  • QLineEdit using backspace on virtual keyboard causes keyboard to flash

    Unsolved
    4
    0 Votes
    4 Posts
    420 Views
    Andy314A
    Hi carlinski, I struggle on the same problem. Have you solved it ?
  • Android open Keyboard in a loop for QDialogs

    Unsolved
    4
    0 Votes
    4 Posts
    218 Views
    Andy314A
    I have rebuilt it in async mode. No fixed loop - QDialog sends Ok signal -> close the QDialog -> open the next dialog. Same effect as before: If I click on my Ok-Button, next call of my dialog opens not the Keyboard. Then I have tested some more and got a much more strange effect. If I set a timer in init code of the QDialog, what triggers the OK-Button (same code as manual click) all works. Next call opens the Keyboard again. What is the diffence of Clicking the Button manual to call the same Button-click-code via timer ??? I tried in the button-click-code send a singel-shot to trigger the code. No change. Only click via finger destory the funktion. With as separte button on the dialog I can open the keyboard -> the code works ! Only automatic at open does not work. Besides the solution of this problem is very important for me. The main task is not the simple textedit-Dialog, but I must receive the scanner results from the Zebra scanner. Therefore the Keyboard must be open for some milliseconds.
  • Comment créer une application responsive?

    Unsolved
    4
    0 Votes
    4 Posts
    194 Views
    SGaistS
    Donc c'est bien ça le problème, il faut les mettre dans un layout comme expliqué dans ce chapitre de la documentation de Designer.