Skip to content

Mobile and Embedded

The forum for developing everything embedded: Linux, WinCE, Symbian, MeeGo... you name it.
13.9k Topics 61.7k Posts
  • meta qt6 lts-6.5 can not fetch

    Unsolved
    2
    0 Votes
    2 Posts
    147 Views
    SGaistS

    Hi,

    The URL looks like it's in an private area.

    Shouldn't it rather be https://mirrors.kernel.org/yocto-sources/git2/code.qt.io.qt.qtdeclarative.git/ ?

  • yocto qt6 -b lts-6.5.6

    Unsolved
    2
    0 Votes
    2 Posts
    66 Views
    No one has replied
  • 0 Votes
    5 Posts
    1k Views
    P

    I had the same problem upgrading from 6.6 to 6.7, I resolved it by using the correct NDK (26.1.10909125), see https://doc.qt.io/qt-6/android-getting-started.html

  • Is the Bluetooth of QT6.3.1 related to the iOS version

    Unsolved
    1
    0 Votes
    1 Posts
    38 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • How to get battery rate on android devices

    Unsolved
    2
    0 Votes
    2 Posts
    105 Views
    No one has replied
  • QT5 on Android 14

    Unsolved
    5
    0 Votes
    5 Posts
    314 Views
    R

    Hello.
    I actually don't have a physical device with Android 14 to debug.
    So I tried with the Google emulator (Google Play Games Developer Emulator) where the error occurs when running the APP.
    But I tested it with a friend's cell phone with Android 14 and the APP worked.
    The APP opens, but an error occurs in the APP when trying to connect to the Firebird database.
    I'm using a lib "libfbclient.so" provided by Firebird for connection.
    I don't know if this lib could be the problem.
    Fact that it works on Android 13. But on Android 14, the connection to the database does not work.

    Do you recommend any emulator for Android 14?
    The existing emulators in Android Studio API level 34 do not work on my computer.
    And the Google emulator that I downloaded causes an error in the APP, but not on the physical device. So I believe that the emulator has a problem.

  • QT6 request permittion (notifications in my case)?

    Unsolved
    2
    0 Votes
    2 Posts
    105 Views
    S

    OK, so for Android its kinda simple, just put to main.cpp:

    #include <QtCore/qjniobject.h> #include <QtCore/qcoreapplication.h> #include <QtCore/private/qandroidextras_p.h> int main(int argc, char *argv[]) { ... #ifdef __ANDROID__ if (QNativeInterface::QAndroidApplication::sdkVersion() >= __ANDROID_API_T__) { const auto notificationPermission = "android.permission.POST_NOTIFICATIONS"; auto requestResult = QtAndroidPrivate::requestPermission(notificationPermission); //if (requestResult.result() != QtAndroidPrivate::Authorized) { qWarning() << "Failed to acquire permission to post notifications (required for Android 13+)"; } } #endif ... }

    but how to I handle same in iOS?

  • lcurl and JSON issue

    Solved
    5
    0 Votes
    5 Posts
    132 Views
    Christian EhrlicherC

    @piervalli said in lcurl and JSON issue:

    I use lcurl instead of QNAM, because I am sure that there is a single post (request to server) instead with QNAM

    I doubt this...

  • Got compile error when build Qt 6.7.2 for Android

    Unsolved
    3
    0 Votes
    3 Posts
    231 Views
    ytexasY

    @mvuori Thanks for reply,

    I have tried downgraded NDK version, from 26.x to 22.x, event the 26.1.10909125 which is the same version of NDK used in the document. All of them would got compile error (may have different error messages like missing wchar.h ).

  • 1 Votes
    4 Posts
    110 Views
    KH-219DesignK

    This next part is a tangent, but I mention it because you might run into this next:

    You may also need to use a kind of "dummy imports qml" file later, to make sure that the deployed app contains all the Qt framework QML that you expect.

    Example: https://github.com/219-design/qt-qml-project-template-with-ci/blob/a85e7f49a127eab/src/app/imports.qml

  • 0 Votes
    13 Posts
    443 Views
    SGaistS

    That was a nasty one. Glad you found out and thanks for sharing !

  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • How to set app icon?

    Unsolved
    4
    0 Votes
    4 Posts
    551 Views
    SGaistS

    @Gilberrt hi, it's literally the first platform explained in the link posted by the OP. Qt 5 and Qt 6.

  • 0 Votes
    2 Posts
    125 Views
    J

    Hello,

    To remove the small lines with triangles (scroll indicators) above and below the scroll bar in your QComboBox’s QListView, you can customize the style of the scroll bar using a stylesheet. Here’s how you can do it:
    Set the Scroll Bar Policy: Ensure that the scroll bar is set to always show or hide as needed.
    Customize the Scroll Bar Style: Use a stylesheet to hide the scroll indicators.
    Hope that helps.

  • Native phone application performance or C++ performance

    Unsolved
    3
    0 Votes
    3 Posts
    197 Views
    S

    "Native code" means native to the processor. The processor does not understand Java or Swift. Swift is also compiled into "native code" whereas Java is usually compiled to bytecode which is then converted to native code by the Java VM. So, at least in theory your C++ Qt app should be faster than Java on Android and has the potential to be as fast as Swift on iOS (if not even faster according to a recent study). QML, however, is a different story: By default this is compiled at runtime (though there is an option to pre-compile it, I think). You might still include some code in JavaScript with QML. JavaScript generally performs worse than Java.

    Generally speaking, you don't pay a performance penalty for using C++ on these platform. But, you might pay a performance penalty for using QML because it is not using native GUI elements (as far as my knowledge goes; I don't use QML personally). For most apps I doubt you'll notice the overhead of using QML.

    Maybe someone with more experience using QML can chime in.

  • 0 Votes
    14 Posts
    1k Views
    A

    Here's a complete patch for hacks according to @Jojojoris's investigation and changes to make video playback work with un-extended GLES2. I have only tested it with the GStreamer backend where it does work in my situation: VP8 video resulting in NV12 format, i.MX6 DualLite SoC, Linux 5.15.74, etnaviv driver from Mesa 22.1.7.

    Since it isn't possible to paste files here, I'm pasting it as a code block. The file name would be: 0001-HACK-disable-texture-and-pixel-formats-that-don-t-wo.patch

    From 7a194147152534efd213346771ce3af135e3df02 Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz <andreas@ixgreen.de> Date: Thu, 1 Aug 2024 14:10:27 +0200 Subject: [PATCH] HACK: disable texture and pixel formats that don't work with GLES2 Un-extended GLES2 doesn't support R8 and RG8 texture formats. For R8, RHI's RED_OR_ALPHA8 is a suitable workaround resulting in A[lpha]8, but for RG8, there is no simple workaround. To avoid the need for RG8, crudely mark the NV12 and NV21 pixel formats whose OpenGL pixel conversion shaders require it as unsupported in the commonly used GStreamer and FFMPEG backends. Symptoms without this hack, on i.MX6 DualLite / etnaviv: OpenGL error messages about unsupported texture format R8 and the video output is just solid green. Mostly based on a post of user Jojojoris on forum.qt.io. --- src/multimedia/shaders/yuv_triplanar.frag | 6 +++--- src/multimedia/shaders/yuv_triplanar_p10.frag | 6 +++--- src/multimedia/shaders/yvu_triplanar.frag | 6 +++--- src/multimedia/video/qvideotexturehelper.cpp | 20 +++++++++---------- .../multimedia/ffmpeg/qffmpegvideobuffer.cpp | 9 +++++++++ .../common/qgstvideorenderersink.cpp | 6 ++++++ 6 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/multimedia/shaders/yuv_triplanar.frag b/src/multimedia/shaders/yuv_triplanar.frag index 5b83b05b5..0d3ab7a2c 100644 --- a/src/multimedia/shaders/yuv_triplanar.frag +++ b/src/multimedia/shaders/yuv_triplanar.frag @@ -6,20 +6,20 @@ layout(location = 0) in vec2 texCoord; layout(location = 0) out vec4 fragColor; layout(binding = 1) uniform sampler2D plane1Texture; layout(binding = 2) uniform sampler2D plane2Texture; layout(binding = 3) uniform sampler2D plane3Texture; void main() { - float Y = texture(plane1Texture, texCoord).r; - float U = texture(plane2Texture, texCoord).r; - float V = texture(plane3Texture, texCoord).r; + float Y = texture(plane1Texture, texCoord).a; + float U = texture(plane2Texture, texCoord).a; + float V = texture(plane3Texture, texCoord).a; vec4 color = vec4(Y, U, V, 1.); fragColor = ubuf.colorMatrix * color * ubuf.opacity; #ifdef QMM_OUTPUTSURFACE_LINEAR fragColor = convertSRGBToLinear(fragColor); #endif } diff --git a/src/multimedia/shaders/yuv_triplanar_p10.frag b/src/multimedia/shaders/yuv_triplanar_p10.frag index bac34c72c..fbbed3506 100644 --- a/src/multimedia/shaders/yuv_triplanar_p10.frag +++ b/src/multimedia/shaders/yuv_triplanar_p10.frag @@ -6,20 +6,20 @@ layout(location = 0) in vec2 texCoord; layout(location = 0) out vec4 fragColor; layout(binding = 1) uniform sampler2D plane1Texture; layout(binding = 2) uniform sampler2D plane2Texture; layout(binding = 3) uniform sampler2D plane3Texture; void main() { - float Y = texture(plane1Texture, texCoord).r * 64; - float U = texture(plane2Texture, texCoord).r * 64; - float V = texture(plane3Texture, texCoord).r * 64; + float Y = texture(plane1Texture, texCoord).a * 64; + float U = texture(plane2Texture, texCoord).a * 64; + float V = texture(plane3Texture, texCoord).a * 64; vec4 color = vec4(Y, U, V, 1.); fragColor = ubuf.colorMatrix * color * ubuf.opacity; #ifdef QMM_OUTPUTSURFACE_LINEAR fragColor = convertSRGBToLinear(fragColor); #endif } diff --git a/src/multimedia/shaders/yvu_triplanar.frag b/src/multimedia/shaders/yvu_triplanar.frag index 37fc3a18d..cfe406f2a 100644 --- a/src/multimedia/shaders/yvu_triplanar.frag +++ b/src/multimedia/shaders/yvu_triplanar.frag @@ -6,20 +6,20 @@ layout(location = 0) in vec2 texCoord; layout(location = 0) out vec4 fragColor; layout(binding = 1) uniform sampler2D plane1Texture; layout(binding = 2) uniform sampler2D plane2Texture; layout(binding = 3) uniform sampler2D plane3Texture; void main() { - float Y = texture(plane1Texture, texCoord).r; - float V = texture(plane2Texture, texCoord).r; - float U = texture(plane3Texture, texCoord).r; + float Y = texture(plane1Texture, texCoord).a; + float V = texture(plane2Texture, texCoord).a; + float U = texture(plane3Texture, texCoord).a; vec4 color = vec4(Y, U, V, 1.); fragColor = ubuf.colorMatrix * color * ubuf.opacity; #ifdef QMM_OUTPUTSURFACE_LINEAR fragColor = convertSRGBToLinear(fragColor); #endif } diff --git a/src/multimedia/video/qvideotexturehelper.cpp b/src/multimedia/video/qvideotexturehelper.cpp index 3675e157f..0627cf556 100644 --- a/src/multimedia/video/qvideotexturehelper.cpp +++ b/src/multimedia/video/qvideotexturehelper.cpp @@ -88,97 +88,97 @@ static const TextureDescription descriptions[QVideoFrameFormat::NPixelFormats] = }, // Format_AYUV_Premultiplied { 1, 4, [](int stride, int height) { return stride*height; }, { QRhiTexture::RGBA8, QRhiTexture::UnknownFormat, QRhiTexture::UnknownFormat }, { { 1, 1 }, { 1, 1 }, { 1, 1 } } }, // Format_YUV420P { 3, 1, [](int stride, int height) { return stride * ((height * 3 / 2 + 1) & ~1); }, - { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::R8 }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8 }, { { 1, 1 }, { 2, 2 }, { 2, 2 } } }, // Format_YUV422P { 3, 1, [](int stride, int height) { return stride * ((height * 3 / 2 + 1) & ~1); }, - { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::R8 }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8 }, { { 1, 1 }, { 2, 1 }, { 2, 1 } } }, // Format_YV12 { 3, 1, [](int stride, int height) { return stride * ((height * 3 / 2 + 1) & ~1); }, - { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::R8 }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8 }, { { 1, 1 }, { 2, 2 }, { 2, 2 } } }, // Format_UYVY { 1, 2, [](int stride, int height) { return stride*height; }, { QRhiTexture::RGBA8, QRhiTexture::UnknownFormat, QRhiTexture::UnknownFormat }, { { 2, 1 }, { 1, 1 }, { 1, 1 } } }, // Format_YUYV { 1, 2, [](int stride, int height) { return stride*height; }, { QRhiTexture::RGBA8, QRhiTexture::UnknownFormat, QRhiTexture::UnknownFormat }, { { 2, 1 }, { 1, 1 }, { 1, 1 } } }, // Format_NV12 { 2, 1, [](int stride, int height) { return stride * ((height * 3 / 2 + 1) & ~1); }, - { QRhiTexture::R8, QRhiTexture::RG8, QRhiTexture::UnknownFormat }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RG8, QRhiTexture::UnknownFormat }, { { 1, 1 }, { 2, 2 }, { 1, 1 } } }, // Format_NV21 { 2, 1, [](int stride, int height) { return stride * ((height * 3 / 2 + 1) & ~1); }, - { QRhiTexture::R8, QRhiTexture::RG8, QRhiTexture::UnknownFormat }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RG8, QRhiTexture::UnknownFormat }, { { 1, 1 }, { 2, 2 }, { 1, 1 } } }, // Format_IMC1 { 3, 1, [](int stride, int height) { // IMC1 requires that U and V components are aligned on a multiple of 16 lines int h = (height + 15) & ~15; h += 2*(((h/2) + 15) & ~15); return stride * h; }, - { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::R8 }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8 }, { { 1, 1 }, { 2, 2 }, { 2, 2 } } }, // Format_IMC2 { 2, 1, [](int stride, int height) { return 2*stride*height; }, - { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::UnknownFormat }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8, QRhiTexture::UnknownFormat }, { { 1, 1 }, { 1, 2 }, { 1, 1 } } }, // Format_IMC3 { 3, 1, [](int stride, int height) { // IMC3 requires that U and V components are aligned on a multiple of 16 lines int h = (height + 15) & ~15; h += 2*(((h/2) + 15) & ~15); return stride * h; }, - { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::R8 }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8 }, { { 1, 1 }, { 2, 2 }, { 2, 2 } } }, // Format_IMC4 { 2, 1, [](int stride, int height) { return 2*stride*height; }, - { QRhiTexture::R8, QRhiTexture::R8, QRhiTexture::UnknownFormat }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RED_OR_ALPHA8, QRhiTexture::UnknownFormat }, { { 1, 1 }, { 1, 2 }, { 1, 1 } } }, // Format_Y8 { 1, 1, [](int stride, int height) { return stride*height; }, - { QRhiTexture::R8, QRhiTexture::UnknownFormat, QRhiTexture::UnknownFormat }, + { QRhiTexture::RED_OR_ALPHA8, QRhiTexture::UnknownFormat, QRhiTexture::UnknownFormat }, { { 1, 1 }, { 1, 1 }, { 1, 1 } } }, // Format_Y16 { 1, 2, [](int stride, int height) { return stride*height; }, { QRhiTexture::R16, QRhiTexture::UnknownFormat, QRhiTexture::UnknownFormat }, { { 1, 1 }, { 1, 1 }, { 1, 1 } } }, // Format_P010 { 2, 2, diff --git a/src/plugins/multimedia/ffmpeg/qffmpegvideobuffer.cpp b/src/plugins/multimedia/ffmpeg/qffmpegvideobuffer.cpp index 7b72a3cfe..d70e9cb9c 100644 --- a/src/plugins/multimedia/ffmpeg/qffmpegvideobuffer.cpp +++ b/src/plugins/multimedia/ffmpeg/qffmpegvideobuffer.cpp @@ -264,24 +264,33 @@ QVideoFrameFormat::PixelFormat QFFmpegVideoBuffer::toQtPixelFormat(AVPixelFormat case AV_PIX_FMT_YUV422P: return QVideoFrameFormat::Format_YUV422P; case AV_PIX_FMT_YUV420P: return QVideoFrameFormat::Format_YUV420P; case AV_PIX_FMT_YUV420P10: return QVideoFrameFormat::Format_YUV420P10; case AV_PIX_FMT_UYVY422: return QVideoFrameFormat::Format_UYVY; case AV_PIX_FMT_YUYV422: return QVideoFrameFormat::Format_YUYV; +// The following two are disabled because the pixel format conversion shader for these requires the RG8 pixel +// format, which is not supported in OpenGL ES2 without GL_EXT_texture_rg, which etnaviv does not currently +// (July 2024) support. It will probably come with OpenGL ES3 support in etnaviv, which seems to be the focus +// of its development. ES3 supports RG8 textures in the base specification. +// (UNTESTED. It is possible that this crude approach breaks something or everything video-related. It might +// be necessary to recognize these formats in situations other than "which Qt format should we choose for the +// output buffer".) +#if 0 case AV_PIX_FMT_NV12: return QVideoFrameFormat::Format_NV12; case AV_PIX_FMT_NV21: return QVideoFrameFormat::Format_NV21; +#endif case AV_PIX_FMT_GRAY8: return QVideoFrameFormat::Format_Y8; case AV_PIX_FMT_GRAY16: return QVideoFrameFormat::Format_Y16; case AV_PIX_FMT_P010: return QVideoFrameFormat::Format_P010; case AV_PIX_FMT_P016: return QVideoFrameFormat::Format_P016; case AV_PIX_FMT_MEDIACODEC: diff --git a/src/plugins/multimedia/gstreamer/common/qgstvideorenderersink.cpp b/src/plugins/multimedia/gstreamer/common/qgstvideorenderersink.cpp index d67319fdd..e6a572210 100644 --- a/src/plugins/multimedia/gstreamer/common/qgstvideorenderersink.cpp +++ b/src/plugins/multimedia/gstreamer/common/qgstvideorenderersink.cpp @@ -55,22 +55,28 @@ void QGstVideoRenderer::createSurfaceCaps() auto caps = QGstCaps::create(); // All the formats that both we and gstreamer support auto formats = QList<QVideoFrameFormat::PixelFormat>() << QVideoFrameFormat::Format_YUV420P << QVideoFrameFormat::Format_YUV422P << QVideoFrameFormat::Format_YV12 << QVideoFrameFormat::Format_UYVY << QVideoFrameFormat::Format_YUYV +// The following two are disabled because the pixel format conversion shader for these requires the RG8 +// pixel format, which is not supported in OpenGL ES2 without GL_EXT_texture_rg, which etnaviv does not +// currently (July 2024) support. It will probably come with OpenGL ES3 support in etnaviv, which seems to +// be the focus of its development. ES3 supports RG8 textures in the base specification. +#if 0 << QVideoFrameFormat::Format_NV12 << QVideoFrameFormat::Format_NV21 +#endif << QVideoFrameFormat::Format_AYUV << QVideoFrameFormat::Format_P010 << QVideoFrameFormat::Format_XRGB8888 << QVideoFrameFormat::Format_XBGR8888 << QVideoFrameFormat::Format_RGBX8888 << QVideoFrameFormat::Format_BGRX8888 << QVideoFrameFormat::Format_ARGB8888 << QVideoFrameFormat::Format_ABGR8888 << QVideoFrameFormat::Format_RGBA8888 << QVideoFrameFormat::Format_BGRA8888 -- 2.43.0
  • 0 Votes
    15 Posts
    5k Views
    M

    @iSolve_Tech You are asking in a solved thread something that has nothing to do with the threads topic

  • 0 Votes
    3 Posts
    172 Views
    KaguroK

    Hello @samuel898
    Unfortunately it was not solved :( no one wrote a comment, there is no solution on stack overflow... I already asked the question on Qt Bug Report, but they didn't respond to it even there. :(
    https://bugreports.qt.io/browse/QTBUG-127495
    https://stackoverflow.com/questions/78792793/qcombobox-stops-working-after-tap-back-navigation-on-android-in-qt-6-4-2-c
    I will write it if i have a solution about this.

  • Gradle error building for Android

    Solved
    3
    0 Votes
    3 Posts
    194 Views
    mrdebugM

    In order to build an Android app using Debian 12 and the last qtcreator I have to:

    switch between jdk 12 and 17 remove to recreate the file pro.user close and reopen qtcreator
    After that qtcreator can builds a valid android app. I have to do this each time I want to open a project.