Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. Qt5.1 on Rasberry Pi (full install not cross-compile)
Forum Updated to NodeBB v4.3 + New Features

Qt5.1 on Rasberry Pi (full install not cross-compile)

Scheduled Pinned Locked Moved QtonPi
93 Posts 24 Posters 123.6k 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.
  • G Offline
    G Offline
    geoffml
    wrote on last edited by
    #55

    Hi,
    I run the app from LXterminal. For the cube example I made a shortcut to the desktop and both are full screen. Ran cp command qmake and then make as per instructions. On the PC the window is correctly sized as expected and not full screen.
    Qt Creator 2.6.2
    Qt 5.0.1 (32 bit)
    Windows 7
    MinGw_32bit
    For Qt5onPi.pro

    @#-------------------------------------------------

    Project created by QtCreator 2013-09-01T12:00:39

    #-------------------------------------------------

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = Qt5onPi
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    hled.cpp

    HEADERS += mainwindow.h
    hled.h

    FORMS += mainwindow.ui
    @
    For main.cpp
    @#include "mainwindow.h"
    #include <QApplication>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec&#40;&#41;;
    

    }@
    For mainwindow.cpp
    @#include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include "hled.h"

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    //Connect signals and slots - Read QT documentation for fundamentals
    connect(ui->pushButton_On_Off, SIGNAL(clicked()), SLOT(onpushButton_On_OffClicked()));
    connect(ui->dial_Volume, SIGNAL(actionTriggered(int)), SLOT(on_dial_Volume_actionTriggered(int)));
    connect(ui->lcdNumber, SIGNAL(overflow()), SLOT(on_lcdNumber_overflow));
    ui->Power_Led_On_Off->turnOff(true);
    setWindowTitle(tr("Qt5onPi v1.0"));
    }

    MainWindow::~MainWindow()
    {
    delete ui;
    }

    void MainWindow::on_pushButton_On_Off_clicked()
    {
    ui->Power_Led_On_Off->toggle();
    }

    void MainWindow::on_dial_Volume_valueChanged(int value)
    {
    this->ui->lcdNumber->display(value);
    }

    void MainWindow::on_lcdNumber_overflow()
    {

    }
    @

    Thanks

    1 Reply Last reply
    0
    • G Offline
      G Offline
      geoffml
      wrote on last edited by
      #56

      Hi,
      Here's the relevant mainwindow.ui code that defines the size set to max 430 x 430

      @<?xml version="1.0" encoding="UTF-8"?>
      <ui version="4.0">
      <class>MainWindow</class>
      <widget class="QMainWindow" name="MainWindow">
      <property name="geometry">
      <rect>
      <x>0</x>
      <y>0</y>
      <width>430</width>
      <height>430</height>
      </rect>
      </property>
      <property name="maximumSize">
      <size>
      <width>430</width>
      <height>430</height>
      </size>
      </property>
      <property name="windowTitle">
      <string>MainWindow</string>@

      Thanks

      1 Reply Last reply
      0
      • P Offline
        P Offline
        postmako
        wrote on last edited by
        #57

        Well hopefully someone else will be able to help you with this. My pi is busy at the moment and we will be moving soon. I'll be busy for the next couple of months. Let us know if you end up fixing it and how you did it.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          RavenII
          wrote on last edited by
          #58

          Anyone know why I might be running into an issue building qt5 all of a sudden? I compiled it a week or so ago with no issue...now I run into "this":http://pastebin.com/sCPfL5DB

          1 Reply Last reply
          0
          • G Offline
            G Offline
            geoffml
            wrote on last edited by
            #59

            Hi,
            Just an update to let you guys know I now have Qt5.1.1 installed and running on my RPi, reading and writing to the ttyUSB0 port.

            The screen issue has been resolved simply in Qt5 in the .ui Form, where the API is displayed in the center of a £13 3.5" LCD monitor. The RPi is powered from a 5Ahr USB rechargeable power pack, making it portale.

            @ <layout class="QGridLayout" name="gridLayout">
            <item row="0" column="0" alignment="Qt::AlignVCenter">
            <widget class="QToolBox" name="toolBox">
            <property name="minimumSize">
            <size>
            <width>575</width>
            <height>375</height>@

            1 Reply Last reply
            0
            • P Offline
              P Offline
              polon
              wrote on last edited by
              #60

              Hi
              I am using Qt on Windows and I would like to communicate with RPi.

              I'm trying to compile Qt as explained in this thread and on wiki pages but I have problems.

              @
              pi@raspberrypi ~/opt $ git clone git://gitorious.org/qt/qt5.git
              Cloning into 'qt5'...
              fatal: unable to connect to gitorious.org:
              gitorious.org[0: 87.238.52.168]: errno=Connection timed out
              gitorious.org[1: 2a02:c0:1014::1]: errno=Address family not supported by protocol
              @

              Internet connection is working.
              I'm not an Linux expert.

              I would be grateful for any suggestions how to solve this problem.
              Thanks

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #61

                Try cloning through http instead of git.

                (Z(:^

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  polon
                  wrote on last edited by
                  #62

                  Many thanks for the help!
                  I have used
                  @git clone http://gitorious.org/qt/qt5.git@
                  and it is working.

                  I'm slowly going forward.

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    polon
                    wrote on last edited by
                    #63

                    Unfortunately git through http has not finished successfully.
                    @Cloning into 'qtbase'...
                    error: The requested URL returned error: 502 (curl_result = 22, http_code = 502, sha1 = 0bcb75ae5bb29dfc3d303bbada13341fa7969858)
                    error: Unable to find 0bcb75ae5bb29dfc3d303bbada13341fa7969858 under http://gitorious.org/qt/qtbase.git
                    Cannot obtain needed tree 0bcb75ae5bb29dfc3d303bbada13341fa7969858
                    while processing commit e6cac2c19315c9127f5b4048088e66da6b9296fe.
                    error: Fetch failed.
                    @

                    I have moved to another network with access to git and it was ok for long time. However after one day of compiling there was some problem with power and it was not finished.

                    I am trying to run it once again but now I have problem with configure
                    @bash: ./configure -v -opengl: No such file or directory@
                    When I run configure without options it works.

                    I would be grateful for any suggestions what I'm doing wrong.

                    Or maybe somebody is able to build a torrent with image of rpi with qt? I promise to seed it.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      misiek303
                      wrote on last edited by
                      #64

                      Can someone share a plain raspberry/qt5 image with all.

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        polon
                        wrote on last edited by
                        #65

                        I have managed to compile this.
                        There are some errors when the cube example is run
                        @EGLFS: Unable to query physical screen size, defaulting to 100 dpi.
                        EGLFS: To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
                        EGLFS: Unable to query screen depth, defaulting to 32.
                        EGLFS: To override, set QT_QPA_EGLFS_DEPTH.
                        @
                        but I am able to compile and run my software.

                        I have made back up image of my sd card
                        @sudo dd if=/dev/mmcblk0 of=/path/to/image.img@
                        The image is more than 4GB. I have tested the backup: qmake and make are ok. Unfortunately there are some problems with "opt" directory, tightvncserver and possibly other as well ....
                        Do you know what caused the problems? Should I do the image in another way?

                        If somebody would like a copy of the image, despite the problems, I will try to help.
                        I can try to create a torrent or maybe there is better solution?

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          tiotodi
                          wrote on last edited by
                          #66

                          Hi,

                          Sorry for up this old thread.
                          In the ./configure, I get this error:

                          bq. bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
                          Symbolic function binding disabled.

                          How can I disable it? Even in the output file said it is disabled, didn't create the make file and I can not continue the install process.

                          What can I do?

                          Thanks!

                          1 Reply Last reply
                          0
                          • Y Offline
                            Y Offline
                            YDYD
                            wrote on last edited by
                            #67

                            Hi all,

                            I have the same problem that POLON encounter

                            pi@raspberrypi ~/opt $ git clone git://gitorious.org/qt/qt5.git

                            Cloning into 'qt5'...

                            fatal: unable to connect to gitorious.org:

                            gitorious.org[0: 87.238.52.168]: errno=Connection timed out
                            gitorious.org[1: 2a02:c0:1014::1]: errno=Address family not supported by protocol

                            I can't figure out what is going on, I have been on Linux environment for just 3 days,
                            i was requested to install a Qt on Raspberry-Pi Debian Wheezy.

                            1 Reply Last reply
                            0
                            • Y Offline
                              Y Offline
                              YDYD
                              wrote on last edited by
                              #68

                              In order to properly run configure for Qt5 on the Raspberry Pi, you need to point the CROSS_COMPILE variable to the native compiler located at /usr/bin/g++. The CROSS_COMPILE parameter is the path to the compiler (without the g++). If you do not do this properly it will complain that it is not being cross compiled.

                              All output is stored in the file called ‘output’ in case something goes wrong. At the end of the output file it should say you can run ‘make’, if not look for errors at the end of the output.

                              Do not be concerned with some things not building due to missing packages, there will be errors for those. If it does not mention that you can run make then check the last error, it is generally the show-stopper.
                              Run configure:
                              ./configure -v -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5 &> output

                              This part i could not go through.. any advise?????

                              URGENT!! PLEASE HELP, thank you very much

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                JvdGlind
                                wrote on last edited by
                                #69

                                Have a look at "this blog":http://www.ics.com/blog/building-qt-5-raspberry-pi. I followed most of it with 5.3 and eventually got it to run.

                                Jeffrey VAN DE GLIND
                                Principle Consultant @ Nalys
                                www.nalys-group.com

                                1 Reply Last reply
                                0
                                • Y Offline
                                  Y Offline
                                  YDYD
                                  wrote on last edited by
                                  #70

                                  Hi JvdGlind,

                                  Thanks for your reply, going to take a look now =)

                                  1 Reply Last reply
                                  0
                                  • Y Offline
                                    Y Offline
                                    YDYD
                                    wrote on last edited by
                                    #71

                                    Hi, JvdGlind,

                                    I could not understand the following... The pi$ should be LXterminal. What is the Host Workstation?

                                    bq. Throughout this guide the symbol “$” denotes a command prompt on the host workstation, and “pi$” denotes a command prompt on the target Raspberry Pi.

                                    1 Reply Last reply
                                    0
                                    • J Offline
                                      J Offline
                                      JvdGlind
                                      wrote on last edited by
                                      #72

                                      The website shows how to cross-compile from Linux on a PC to a Raspberry Pi. The host workstation is Linux on the PC you are compiling on.

                                      Jeffrey VAN DE GLIND
                                      Principle Consultant @ Nalys
                                      www.nalys-group.com

                                      1 Reply Last reply
                                      0
                                      • Y Offline
                                        Y Offline
                                        YDYD
                                        wrote on last edited by
                                        #73

                                        I was just plugin keyboard and mouse and a SD card to use my raspi

                                        1 Reply Last reply
                                        0
                                        • J Offline
                                          J Offline
                                          Jaeheon Chung
                                          wrote on last edited by
                                          #74

                                          Can I use this instruction for Banana Pi which using raspbian?
                                          I confuse device name of configuration below:
                                          ./configure -v -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5 &> output

                                          Should I use option linux-rasp-pi-g++ ?

                                          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