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. only one QPushButton with QWidget works
Forum Updated to NodeBB v4.3 + New Features

only one QPushButton with QWidget works

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
39 Posts 5 Posters 4.5k Views 3 Watching
  • 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.
  • K Offline
    K Offline
    K-Str
    wrote on 11 Sept 2019, 14:25 last edited by K-Str 9 Nov 2019, 14:31
    #29

    @JonB ,
    thanks for your answer,
    Is it also possible to start a script where you can pass the full path application?
    Maybe a script which gets the application in a environment variable or so. E.g ??full-path-of-appl??* is the environment variable:
    Script

    MyGDB
    
    export DISPLAY=:0
    gdbserver ??*full-path-of-appl*??
    

    this means I have to start the script MyGDB by Qt-creator

    J 1 Reply Last reply 11 Sept 2019, 14:31
    0
    • K K-Str
      11 Sept 2019, 14:25

      @JonB ,
      thanks for your answer,
      Is it also possible to start a script where you can pass the full path application?
      Maybe a script which gets the application in a environment variable or so. E.g ??full-path-of-appl??* is the environment variable:
      Script

      MyGDB
      
      export DISPLAY=:0
      gdbserver ??*full-path-of-appl*??
      

      this means I have to start the script MyGDB by Qt-creator

      J Online
      J Online
      JonB
      wrote on 11 Sept 2019, 14:31 last edited by JonB 9 Nov 2019, 14:32
      #30

      @k-str
      Don't follow your question. In a script you can do whatever you could do from the command-line. If you mean: can a script access environment variables, or can a script examine and pass on arguments passed to it, the answer to both is yes.

      You need to look at the documentation of whatever shell you are using for its scripting syntax. If you're Linux the standard one these days is bash, I don't know if that applies to whatever mobile. In your question I wonder if you're asking if you can pass an argument to the script on the command line and then pass it on to your gdbserver? In which case in bash script try:

      gdbserver "$1"
      

      If it's in an envivironment variable:

      gdbserver "$SOMEVARIABLE"
      
      1 Reply Last reply
      1
      • K Offline
        K Offline
        K-Str
        wrote on 11 Sept 2019, 14:33 last edited by
        #31

        @JonB ,
        this looks very good. I will try it tomorrow.
        Thanks a lot!

        1 Reply Last reply
        0
        • K Offline
          K Offline
          K-Str
          wrote on 12 Sept 2019, 09:49 last edited by K-Str 9 Dec 2019, 09:50
          #32

          Hi @JonB ,
          thanks for your tip but I cannot find a way how to do this.
          Is there a way to execute a program by Qt-Creator by running a bash-script on the target machine (=raspberry)?
          It should look like :

          #!/bin/bash
          export DISPLAY=:0
          ??run or debug** <*application*>??
          

          Maybe this is a new topic?

          J J 2 Replies Last reply 12 Sept 2019, 09:55
          0
          • K K-Str
            12 Sept 2019, 09:49

            Hi @JonB ,
            thanks for your tip but I cannot find a way how to do this.
            Is there a way to execute a program by Qt-Creator by running a bash-script on the target machine (=raspberry)?
            It should look like :

            #!/bin/bash
            export DISPLAY=:0
            ??run or debug** <*application*>??
            

            Maybe this is a new topic?

            J Online
            J Online
            JonB
            wrote on 12 Sept 2019, 09:55 last edited by
            #33

            @k-str
            I don't know because I don't use Qt Creator! You should look at wherever it documents its command line arguments, maybe you go qt-creator project-pro-file?

            Having said that, I would advise you again to consider what I have suggested about not having to use a separate script file and instead making your code use qputenv() to set the DISPLAY environment variable very early, if it's not already set (use qgetetnv() for that), if you can make that work. Your life will be easier for both development and release if you do not have a separate wrapper.

            1 Reply Last reply
            0
            • K K-Str
              12 Sept 2019, 09:49

              Hi @JonB ,
              thanks for your tip but I cannot find a way how to do this.
              Is there a way to execute a program by Qt-Creator by running a bash-script on the target machine (=raspberry)?
              It should look like :

              #!/bin/bash
              export DISPLAY=:0
              ??run or debug** <*application*>??
              

              Maybe this is a new topic?

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 12 Sept 2019, 10:52 last edited by
              #34

              @k-str There is no need for this script work around when running in QtCreator: go to Projects/Build & Run/Run and add the DISPLAY variable there in "Run Environment".

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

              1 Reply Last reply
              1
              • K Offline
                K Offline
                K-Str
                wrote on 12 Sept 2019, 14:58 last edited by
                #35

                @jsulm ,
                thanks, this sounds quiet easy! But I cannot find the point "Run Environment" where I can insert DISPLAY=:0.
                See screenshot:
                0_1568300283359_Screenshot from 2019-09-12 16-50-55.png

                J J 2 Replies Last reply 12 Sept 2019, 17:04
                0
                • K K-Str
                  12 Sept 2019, 14:58

                  @jsulm ,
                  thanks, this sounds quiet easy! But I cannot find the point "Run Environment" where I can insert DISPLAY=:0.
                  See screenshot:
                  0_1568300283359_Screenshot from 2019-09-12 16-50-55.png

                  J Online
                  J Online
                  JonB
                  wrote on 12 Sept 2019, 17:04 last edited by JonB 9 Dec 2019, 17:05
                  #36

                  @k-str
                  I don't use Qt Creator, but I think you need to scroll down on that dialog on the right, did you not try that?

                  1 Reply Last reply
                  1
                  • K K-Str
                    12 Sept 2019, 14:58

                    @jsulm ,
                    thanks, this sounds quiet easy! But I cannot find the point "Run Environment" where I can insert DISPLAY=:0.
                    See screenshot:
                    0_1568300283359_Screenshot from 2019-09-12 16-50-55.png

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 13 Sept 2019, 04:17 last edited by
                    #37

                    @k-str Scroll down...

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

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      K-Str
                      wrote on 17 Sept 2019, 11:18 last edited by K-Str
                      #38

                      @jsulm, hi to all,
                      I'm sorry, but I think I made some failures.
                      I checked everything and I think the problem is the LCD hardware.
                      I use one

                      • QUIMAT 3.5"
                      • HDMI Display-B
                      • 480x320 Dots V1.2
                      • type MPI3508
                      • pen interface SPI

                      Maybe this cannot handle EGL mode.
                      Which plugin should I use for this LCD display?
                      I configered xcb but this is not ok. See below.
                      Now I installed Qt completely new using this instructions:
                      [https://wiki.qt.io/RaspberryPi2EGLFS]
                      and also some modifications from here;
                      [https://forum.qt.io/topic/83700/raspberry-pi-3-compile-with-x11-eglf-not-wanted]
                      The configuration command is:

                      ./configure -release -no-eglfs -qt-xcb -xcb -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linker
                      

                      But I still get errors

                      qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
                      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                      
                      Available platform plugins are: linuxfb, minimal, offscreen, vnc, xcb.
                      

                      Are there instructions how to configure xcb or linuxfb or one of the above mentioned plugins

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        K-Str
                        wrote on 9 Oct 2019, 10:15 last edited by K-Str 10 Sept 2019, 13:05
                        #39

                        Hello,
                        I give up to install Qt Creator for remote development. It's like "Sisyphean task".
                        Now I installed Qt on my Raspberry and here I try to do my work.
                        I use the RemoteDesktop.
                        It seems it works for me.
                        Thanks a lot to all helpers.

                        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