Skip to content

Mobile and Embedded

The forum for developing everything embedded: Linux, WinCE, Symbian, MeeGo... you name it.
14.2k Topics 62.7k Posts
  • How to call JAVA method that returns a String?

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    N
    Thanks for the tip. The problem was callMethod vs callObjectMethod. I think callObjectMethod is for functions that return L types (classes) and the former for primitive types. Thanks
  • Compiling Qt5.14 for RaspberryPi4

    Solved
    10
    0 Votes
    10 Posts
    3k Views
    M
    The problem was that cross compilation was successfull but make install had an error relating to qt3d, thus the quickcontrols2 dll did not get copied to the right directory
  • 0 Votes
    2 Posts
    909 Views
    Shrinidhi UpadhyayaS
    @Shrinidhi-Upadhyaya Fixed it by replacing the JDK with jdk1.8.0_211.
  • Not getting the correct response from hardware?

    Unsolved
    2
    0 Votes
    2 Posts
    181 Views
    SGaistS
    Hi, What exactly are you sending ? What exactly are you getting ? What exactly are you expecting ? Out of curiosity, why not use the asynchronous nature of QSerialPort ?
  • Boot2Qt Splash Screen

    Solved
    3
    0 Votes
    3 Posts
    594 Views
    K
    Ok I'll do that then, thanks!.
  • Image support using OpenGL ES 3.0 on S32V234

    Unsolved
    3
    0 Votes
    3 Posts
    311 Views
    R
    Hello, Here are the code details, We are writing OpenGL ES 2.0 simple application of loading a texture(.png) on QT 5.10 using QOpenGLWidget. We are able to build and run in both Windows and Ubuntu version 16.04 Environment, but we are targetting the NXP S32V234 board. We have QT 5.10, OpenGL ES 2.0, Linux 4.19 version running on NXP S32V234 board, there it fails to load the texture. Pointers would be much appreciated. Here is the vertex and fragment shader code which are compiled using normal gl functions not the QT's addShaderFromSourceFile function. //Vertex Shader #ifdef GL_ES precision mediump int; precision mediump float; #endif attribute vec3 position; attribute vec3 color; attribute vec2 texCoord; varying vec3 Color; varying vec2 TexCoord; uniform mat4 transform; void main() { gl_Position = transform * vec4(position, 1.0); Color = color; TexCoord = texCoord; } //Fragment Shader #ifdef GL_ES precision mediump int; precision mediump float; #endif uniform sampler2D outputTexture; varying vec3 Color; varying vec2 TexCoord; void main() { gl_FragColor = texture2D(outputTexture, TexCoord) * vec4(Color, 1.0); } Here is the initialization and loading of texture void MyGL::initializeTextureBuffer() { float vertices[] = { // positions // texture coords 0.0f, 0.3f, 0.0f, 1.0f,0.0f,0.0f, 0.0f, 0.0f, // bottom left /* @pixel (35,57) 0.0f, 0.6f, 0.0f,0.0f,1.0f,0.0f, 0.0f, 1.0f, // top left @pixel (35,27) 0.5f, 0.6f, 0.0f,0.0f,0.0f,1.0f, 1.0f, 1.0f, // top right @pixel (76,27) 0.5f, 0.3f, 0.0f, 1.0f,1.0f,1.0f, 1.0f, 0.0f, // bottom right @pixel (76,57) */ }; glGenBuffers(1, &camTextureBufferObject); glBindBuffer(GL_ARRAY_BUFFER, camTextureBufferObject); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, 0); //unbinding textureQT = loadTexture(":/images/images/CamRedA.PNG"); } QOpenGLTexture* MyGL::loadTexture(const char * path) { QOpenGLTexture* texture; texture = new QOpenGLTexture(QImage(path).mirrored()); texture->setMinificationFilter(QOpenGLTexture::Nearest); texture->setMagnificationFilter(QOpenGLTexture::Linear); texture->setWrapMode(QOpenGLTexture::Repeat); return texture; } Here is the main render loop void MyGL::paintGL() { glClearColor(0.0f, 0.0f, 0.0f, 0.05f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ///********************************* Texture Rendering ********************************************************/ glUseProgram(shaderpgmTexture); glm::mat4 projection = glm::perspective(glm::radians(camspec.fov), (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f); glm::mat4 view = glm::lookAt(camspec.cameraPos, camspec.cameraPos + camspec.cameraFront, camspec.cameraUp); glm::mat4 model = glm::mat4(1.0f); glm::mat4 transform = projection * view * model; glUniformMatrix4fv(glGetUniformLocation(shaderpgmTexture, "transform"), 1, false, &transform[0][0]); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glUniform1i(glGetUniformLocation(shaderpgmTexture, "outputTexture"), 0); glActiveTexture(GL_TEXTURE0); textureQT->bind(); glBindBuffer(GL_ARRAY_BUFFER, camTextureBufferObject); // position attribute GLint vertexLocation = glGetAttribLocation(shaderpgmTexture,"position"); glEnableVertexAttribArray(vertexLocation); glVertexAttribPointer(vertexLocation, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)0); // color GLint colorLocation = glGetAttribLocation(shaderpgmTexture, "color"); glEnableVertexAttribArray(colorLocation); glVertexAttribPointer(colorLocation, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(3 * sizeof(float))); // texture coord attribute GLint vertexTex = glGetAttribLocation(shaderpgmTexture, "texCoord"); glEnableVertexAttribArray(vertexTex); glVertexAttribPointer(vertexTex, 2, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(6 * sizeof(float))); glDrawArrays(GL_QUADS, 0, 4); glDisable(GL_BLEND); glUseProgram(0); /********************************* Texture Rendering - End ********************************************************/ }
  • 0 Votes
    4 Posts
    571 Views
    J.HilkJ
    @sachinbangadkar_ifm you can't even do that with android studio, 1 architecture =1 apk. With upcoming Qt versions (5.14) you can make one aab. That basically contains multiple apks. If you're concerned about the PlayStore, don't be. Uploading multiple apk's is and will be still possible for a while. Take a look at this blog post for more information: https://blog.qt.io/blog/2019/06/28/comply-upcoming-requirements-google-play/
  • Android: build with Linux

    Solved android linux windows jenkin apk
    4
    0 Votes
    4 Posts
    1k Views
    KroMignonK
    I reply to myself, just in case some else has the same issue. Switching the Jenkins build slave from Windows7 to Linux (Debian 10) has reduced the APK build time from 40 minutes to 8 minutes! Yes, my project is relative big ;) Regards Fabrice
  • QMetaObject::invokeMethod: No such method QQuickRootItem::inputMethodQuery

    Unsolved
    2
    0 Votes
    2 Posts
    692 Views
    M
    Hi, I am experiencing exactly the same issue. Have you found any solution? PS The launching issue has been solved in the latest update of QtCreator
  • How to link libraries properly in synchronised sysroot on host computer

    Unsolved
    1
    0 Votes
    1 Posts
    530 Views
    No one has replied
  • Qt example application for GPS

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    T
    #include <iostream> #include <QGeoCoordinate> using namespace std; int main() { QGeoCoordinate qGeoCoord; cout << "Lat.: " << qGeoCoord.latitude() << endl << "Long.: " << qGeoCoord.longitude() << endl << "Alt.: " << qGeoCoord.altitude() << endl; return 0; } This is a simple code which i wrote, but the output is just "-nan" What more should i add to the code?
  • Since Qt 5.12.2 Android application crashes directly after start

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    G
    Hello. It seems I have the same issue. I try to add the Firebace Cloud Messaging to my project, and now after I set v. 5.13.2 my application in some devices is craching at very start. NDK the same as you r19c. I havent catch how youve solve it? Should I use older NDK (btw it seems that FCM libraries should be compiled with NDK 15 or smth) or can you explain how have you solve it exactly?
  • Disable bitcode for iOS project

    Unsolved ios
    7
    1 Votes
    7 Posts
    5k Views
    scarteziniS
    @Shiba 's response worked, but for each compile you need do that. So can put this on <project>.pro to set ENABLE_BITCODE=NO, and it will work every. Q_ENABLE_BITCODE.name = ENABLE_BITCODE Q_ENABLE_BITCODE.value = NO QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
  • Get SwipeView gesture

    Unsolved
    1
    0 Votes
    1 Posts
    202 Views
    No one has replied
  • INSTALLS ignores /res folder

    Unsolved qtbug-79762 android deploy linux
    6
    0 Votes
    6 Posts
    1k Views
    W
    For now I made a custom androiddeployqt that ignores cleanAndroidFiles(options); which deletes the files. Seems to work, only have to delete the build folder manually so it doesn't keep old build files.
  • Different UI via ssh and direct application start on RaspberryPi

    Solved
    4
    0 Votes
    4 Posts
    624 Views
    sierdzioS
    @MajidKamali said in Different UI via ssh and direct application start on RaspberryPi: using -platform eglfs in application arguments solved the problem! But I have another question in this regard. I configured Qt to compile with eglfs, why this is not default mode (platform) in raspberry? If you run from console, with no X server running, Qt will default to EGLFS.
  • qDebug to Qt Creator console don't work

    Unsolved
    1
    0 Votes
    1 Posts
    419 Views
    No one has replied
  • Native compile error on Raspberry Pi3 for Qt6

    Unsolved
    6
    0 Votes
    6 Posts
    653 Views
    jsulmJ
    @ShadowKni You should care as Qt6 is in development and can potentially cause more issues when building than Qt5.
  • [solved] Cannot archive iOS application with Xcode 11 and Qt 5.13.2

    Solved
    2
    0 Votes
    2 Posts
    543 Views
    C
    The problem seems solved after I remove everything from Release-iphoneos folder
  • qtmultimedia with alsa. A lot of problems.

    Unsolved
    1
    0 Votes
    1 Posts
    390 Views
    No one has replied