Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Has anyone ever got a widget running on a rpi3 with LCD-Display (HDMI and SPI-Interface)
Servers for Qt installer are currently down

Has anyone ever got a widget running on a rpi3 with LCD-Display (HDMI and SPI-Interface)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
21 Posts 3 Posters 2.7k Views 2 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-StrK K-Str

    @jsulm Thanks your answer.
    I will try it.
    But

      1. How cann I connect the signals manually to a slot?
      1. How do I prevent of auto-connection?

    Could you give me a hint how to do it?

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

    @K-Str said in Has anyone ever got a widget running on a rpi3 with LCD-Display (HDMI and SPI-Interface):

    How cann I connect the signals manually to a slot?

    Using connect(). https://doc.qt.io/qt-5/signalsandslots.html

    "How do I prevent of auto-connection?" - do not use the naming convention (like on_pushButton_clicked()) - rename your slots to for example pushButtonClicked()

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

    1 Reply Last reply
    0
    • K-StrK Offline
      K-StrK Offline
      K-Str
      wrote on last edited by K-Str
      #11

      @jsulm ,
      I use the qt-creator module to create form sheets.
      Does it not work ? Must I setup everything without using the form file(=.ui)?
      What is the problem? because I can create and run the widget on the host PC.
      Do you think this is more a problem of the Touch-screen drivers?
      Has anybody a idea?

      jsulmJ 1 Reply Last reply
      0
      • K-StrK K-Str

        @jsulm ,
        I use the qt-creator module to create form sheets.
        Does it not work ? Must I setup everything without using the form file(=.ui)?
        What is the problem? because I can create and run the widget on the host PC.
        Do you think this is more a problem of the Touch-screen drivers?
        Has anybody a idea?

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

        @K-Str said in Has anyone ever got a widget running on a rpi3 with LCD-Display (HDMI and SPI-Interface):

        Does it not work ?

        It does. What sometimes causes problems is the auto-connect feature - I was only talking about this and not whole Qt Designer (ui).

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

        1 Reply Last reply
        0
        • K-StrK Offline
          K-StrK Offline
          K-Str
          wrote on last edited by K-Str
          #13

          @jsulm ,
          hi,
          Thanks a lot for your answer!
          Sorry for this delay but I was involved in an other project.
          I use Qt5.10.1! and make a new widget.

          • Here I open forms --> MainWindow.ui
            Screenshot from 2019-11-15 12-32-13.png

          • Next I create two button
            Screenshot from 2019-11-15 12-36-36.png

          • then I execute go to slot
            Screenshot from 2019-11-15 12-37-48.png

          • this makes a new slot:
            mainwindow.cpp
            Screenshot from 2019-11-15 12-40-32.png
            and mainwindow.h
            Screenshot from 2019-11-15 12-40-54.png
            Where must I modify the names? In both files mainwindow.cpp and mainwindow.h

          jsulmJ 1 Reply Last reply
          0
          • K-StrK K-Str

            @jsulm ,
            hi,
            Thanks a lot for your answer!
            Sorry for this delay but I was involved in an other project.
            I use Qt5.10.1! and make a new widget.

            • Here I open forms --> MainWindow.ui
              Screenshot from 2019-11-15 12-32-13.png

            • Next I create two button
              Screenshot from 2019-11-15 12-36-36.png

            • then I execute go to slot
              Screenshot from 2019-11-15 12-37-48.png

            • this makes a new slot:
              mainwindow.cpp
              Screenshot from 2019-11-15 12-40-32.png
              and mainwindow.h
              Screenshot from 2019-11-15 12-40-54.png
              Where must I modify the names? In both files mainwindow.cpp and mainwindow.h

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

            @K-Str said in Has anyone ever got a widget running on a rpi3 with LCD-Display (HDMI and SPI-Interface):

            Where must I modify the names?

            This way you probably can't as designer generates the slot for you.
            I create slots by myself, so can name them as I lake.

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

            1 Reply Last reply
            0
            • K-StrK Offline
              K-StrK Offline
              K-Str
              wrote on last edited by
              #15

              @jsulm ,
              hi,
              I just renamed it as follows:
              mainWindow.cpp
              Screenshot from 2019-11-15 12-56-56.png
              and mainwindow.h
              Screenshot from 2019-11-15 12-53-09.png
              It still doesn't work.
              It is frustrating!
              Was here something wrong?
              What does it mean "You create your slots by yourself"?

              jsulmJ 1 Reply Last reply
              0
              • K-StrK K-Str

                @jsulm ,
                hi,
                I just renamed it as follows:
                mainWindow.cpp
                Screenshot from 2019-11-15 12-56-56.png
                and mainwindow.h
                Screenshot from 2019-11-15 12-53-09.png
                It still doesn't work.
                It is frustrating!
                Was here something wrong?
                What does it mean "You create your slots by yourself"?

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

                @K-Str said in Has anyone ever got a widget running on a rpi3 with LCD-Display (HDMI and SPI-Interface):

                You create your slots by yourself

                You write the code by yourself.
                If you renamed the slot then you have to connect signal and slot manually now:

                connect(ui->pushButton, &QPushButton::clicked, this, MainWindow::MyPushButtonClicked);
                

                Please take a look at https://doc.qt.io/qt-5/signalsandslots.html

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

                1 Reply Last reply
                2
                • K-StrK Offline
                  K-StrK Offline
                  K-Str
                  wrote on last edited by
                  #17

                  @jsulm
                  I'm really sorry but it's crazy.
                  When I go forward step by step you get again new errors.
                  I made it as you suggested but I get new problems:
                  I think I yuse this connect command in a wrong way:
                  Screenshot from 2019-11-15 17-09-52.png
                  When I compile it I get this errors:

                  /home/kurt/qt-projekte/AsimpleWidget/mainwindow.cpp:9: error: invalid use of void expression
                       connect(ui->MyPushButton, &QPushButton::clicked, this, MainWindow::MyPushButtonClicked());
                  

                  and

                  /home/kurt/qt-projekte/AsimpleWidget/mainwindow.cpp:10: error: invalid use of void expression
                       connect(ui->MyRadioButton,&QRadioButton::clicked, this, MainWindow::MyRadioButtonClicked());
                  

                  I think this void makes some problems.
                  Thanks for a hint whats wrong

                  mrjjM 1 Reply Last reply
                  0
                  • K-StrK K-Str

                    @jsulm
                    I'm really sorry but it's crazy.
                    When I go forward step by step you get again new errors.
                    I made it as you suggested but I get new problems:
                    I think I yuse this connect command in a wrong way:
                    Screenshot from 2019-11-15 17-09-52.png
                    When I compile it I get this errors:

                    /home/kurt/qt-projekte/AsimpleWidget/mainwindow.cpp:9: error: invalid use of void expression
                         connect(ui->MyPushButton, &QPushButton::clicked, this, MainWindow::MyPushButtonClicked());
                    

                    and

                    /home/kurt/qt-projekte/AsimpleWidget/mainwindow.cpp:10: error: invalid use of void expression
                         connect(ui->MyRadioButton,&QRadioButton::clicked, this, MainWindow::MyRadioButtonClicked());
                    

                    I think this void makes some problems.
                    Thanks for a hint whats wrong

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #18

                    @K-Str said in Has anyone ever got a widget running on a rpi3 with LCD-Display (HDMI and SPI-Interface):

                    MainWindow::MyRadioButtonClicked()

                    Hi
                    in the connect you should not have the ()
                    MainWindow::MyRadioButtonClicked**()**
                    when using the new syntax. ( the one with no SIGNAL and SLOT macros)

                    connect(ui->MyRadioButton,&QRadioButton::clicked, this, MainWindow::MyRadioButtonClicked); // no () in the end
                    
                    1 Reply Last reply
                    0
                    • K-StrK Offline
                      K-StrK Offline
                      K-Str
                      wrote on last edited by K-Str
                      #19

                      Hi @jsulm ,
                      I think it's like Sisyphean task because I f you solve one problem you get the next one.
                      Thank you for your patience. But I got the next problem:

                      /home/kurt/qt-projekte/AsimpleWidget/mainwindow.cpp:9: error: no matching function for call to ‘MainWindow::connect(QPushButton*&, void (QAbstractButton::*)(bool), MainWindow* const, <unresolved overloaded function type>)’
                           connect(ui->MyPushButton, &QPushButton::clicked, this, MainWindow::MyPushButtonClicked);
                      

                      and

                      /opt/qt5pi/sysroot/usr/local/qt5pi/include/QtCore/qobject.h:275: error: no type named ‘type’ in ‘struct std::enable_if<false, QMetaObject::Connection>’
                      

                      Now seems to be something wrong in the sysroot?

                      1 Reply Last reply
                      0
                      • mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #20

                        @K-Str said in Has anyone ever got a widget running on a rpi3 with LCD-Display (HDMI and SPI-Interface):

                        connect(ui->MyPushButton, &QPushButton::clicked, this, MainWindow::MyPushButtonClicked);

                        Hi
                        You are missing a & ( sorry my bad, i missed it before)

                        connect(ui->MyPushButton, &QPushButton::clicked, this, -->& MainWindow::MyPushButtonClicked);

                        1 Reply Last reply
                        0
                        • K-StrK Offline
                          K-StrK Offline
                          K-Str
                          wrote on last edited by K-Str
                          #21

                          Hi @jsulm ,
                          thank you very much for your assistance!
                          Now I can compile it without any failures!
                          I think this is a problem with qts touch screen drivers for the raspberry.
                          Maybe the system does not forward any signal from the touch screen.
                          It's funny because it works if I use on the pure system. I can make everything.
                          It works also If I create a widget using qt IDE on raspberry itself.
                          But it does not work if I try to cross compile and ruining remotely.
                          Has anybody an idea whats happened?
                          Thanks to everybody in advance for any help.

                          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