Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Deploy windowed application with Qt on Raspi 3
Forum Updated to NodeBB v4.3 + New Features

Deploy windowed application with Qt on Raspi 3

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 2 Posters 936 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    guille31794
    wrote on last edited by guille31794
    #1

    Hi all,
    I'm using Qt 5.1.5.2 for cross-compiling on a raspi 3. Until here all works fine, I can compile.
    But my problems comes when I want to run my application. I can only do it using legacy drivers.

    This also leads that when I ran my application, I don´t have a window surrounding it, just the app and its button floating on the screen. I've had to mess a bit with the graphic library links to make my application works.

    The question here is, how can I run my application in a normal window from operative system? At my current Desktop version everything works like a charm, but in the raspi I don't have any frame encapsulating my program. That also means, that I don't have close button.

    What can I do to execute my app like if was in my desktop pc?

    Thank you all.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      guille31794
      wrote on last edited by guille31794
      #2

      Dear all,

      I can't take screenshots on my raspi because this application is over my desktop and not in it, but despite it's nasty I let you a picture of whats happening to me.

      alt text

      Thanks!

      jsulmJ 1 Reply Last reply
      0
      • G guille31794

        Dear all,

        I can't take screenshots on my raspi because this application is over my desktop and not in it, but despite it's nasty I let you a picture of whats happening to me.

        alt text

        Thanks!

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @guille31794 What OS is running on your device? Do you have X11 running on it?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        G 1 Reply Last reply
        0
        • jsulmJ jsulm

          @guille31794 What OS is running on your device? Do you have X11 running on it?

          G Offline
          G Offline
          guille31794
          wrote on last edited by
          #4

          @jsulm I'm on an installation of Raspberry Os Bulls Eye 32 bits full (with desktop). I installed all the dependencies related with libxcb.so so I think yes, I should have X11 running, but later today I'll make some test and post them here.
          I think I may have some linking problem between the libraries.

          jsulmJ 1 Reply Last reply
          0
          • G guille31794

            @jsulm I'm on an installation of Raspberry Os Bulls Eye 32 bits full (with desktop). I installed all the dependencies related with libxcb.so so I think yes, I should have X11 running, but later today I'll make some test and post them here.
            I think I may have some linking problem between the libraries.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @guille31794 Do you also have any window manager or desktop environment running? Showing window decorations is something done by window manager.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            G 1 Reply Last reply
            0
            • jsulmJ jsulm

              @guille31794 Do you also have any window manager or desktop environment running? Showing window decorations is something done by window manager.

              G Offline
              G Offline
              guille31794
              wrote on last edited by
              #6

              @jsulm sure. I have the default one from Raspberry OS. It's a version of LXDE.

              jsulmJ 1 Reply Last reply
              0
              • G guille31794

                @jsulm sure. I have the default one from Raspberry OS. It's a version of LXDE.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @guille31794 Then you app should have window decoration. Do you switch your app into full-screen mode?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                G 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @guille31794 Then you app should have window decoration. Do you switch your app into full-screen mode?

                  G Offline
                  G Offline
                  guille31794
                  wrote on last edited by
                  #8

                  @jsulm the application doesn't run maximiced. I'm running over EGLFS, that for what I've read is windowsless, it runs apart from the current system windows manager. More on that here: https://doc.qt.io/qt-6/embedded-linux.html
                  The key here to run my application windowed is how can I configure my X11 instalation to use xcb plugin. It's more resources hungry and heavy to run, but in this case, having a couple of dialog windows emerging sometimes and a virtual keyboard that has to be deployed, it's better to run in a windowed environment.

                  Currently when I try to deploy using xcb plugin it says the following:

                  qt.qpa.xcb: could not connect to display 
                  qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
                  This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                  

                  That error I asume is have to be with the linking of the libraries, because they're all installed.
                  Anyway, if I can, I'll try to deploy the keyboard together with the application and try to set the varaibles for height and width to just try adjusting the screen. The final deployment will be over Raspberry pi official touchscreen. Perhaps I can just change the way the dialogs are shown and instead a new window, to use a new frame and avoid several windows at the same time. I need to make some experimenting first in this way.

                  jsulmJ 1 Reply Last reply
                  0
                  • G guille31794

                    @jsulm the application doesn't run maximiced. I'm running over EGLFS, that for what I've read is windowsless, it runs apart from the current system windows manager. More on that here: https://doc.qt.io/qt-6/embedded-linux.html
                    The key here to run my application windowed is how can I configure my X11 instalation to use xcb plugin. It's more resources hungry and heavy to run, but in this case, having a couple of dialog windows emerging sometimes and a virtual keyboard that has to be deployed, it's better to run in a windowed environment.

                    Currently when I try to deploy using xcb plugin it says the following:

                    qt.qpa.xcb: could not connect to display 
                    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
                    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                    

                    That error I asume is have to be with the linking of the libraries, because they're all installed.
                    Anyway, if I can, I'll try to deploy the keyboard together with the application and try to set the varaibles for height and width to just try adjusting the screen. The final deployment will be over Raspberry pi official touchscreen. Perhaps I can just change the way the dialogs are shown and instead a new window, to use a new frame and avoid several windows at the same time. I need to make some experimenting first in this way.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @guille31794 said in Deploy windowed application with Qt on Raspi 3:

                    qt.qpa.xcb: could not connect to display

                    How do you start your application?
                    Do you start it with sudo?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    G 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @guille31794 said in Deploy windowed application with Qt on Raspi 3:

                      qt.qpa.xcb: could not connect to display

                      How do you start your application?
                      Do you start it with sudo?

                      G Offline
                      G Offline
                      guille31794
                      wrote on last edited by
                      #10

                      @jsulm not really. I usually run it from the host machine, using qt with the argument of the platform I want, in this case -platform eglfs or xcb for the error I posted.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved