Qt5.1 on Rasberry Pi (full install not cross-compile)
-
Hi postmako,
Ha it was an encryption issue from PC to USB to RPI. Now I have my Qt5 app, developed on PC, running on RPI thanks to you. I can really make some progress now and plan to make a handheld RPI with touch screen.
I too have a full screen app but I guess this is an OpenGL thing. Any ideas would be welcome. Tried the ./app_name -platform xcb but no joy.
I don't have a web page but I'd be happy to share my working Qt5onPi.img, but even zipped it's over 3GB. Any suggestions such a DropboxCheers
-
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 = appSOURCES += main.cpp
mainwindow.cpp
hled.cppHEADERS += mainwindow.h
hled.hFORMS += 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();
}@
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
-
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
-
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
-
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>@ -
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 -
Try cloning through http instead of git.
-
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.
-
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.
-
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? -
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!
-
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 protocolI 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. -
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 &> outputThis part i could not go through.. any advise?????
URGENT!! PLEASE HELP, thank you very much
-
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.
-
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.