Qt5.1 on Rasberry Pi (full install not cross-compile)
-
I also came across these for wayland support: "http://wayland.freedesktop.org/raspberrypi.html":http://wayland.freedesktop.org/raspberrypi.html
Then build similar to these instructions: "http://qt-project.org/wiki/QtWayland":http://qt-project.org/wiki/QtWayland
@WLD=$HOME/Apps/Wayland # change this to another location if you prefer
LD_LIBRARY_PATH=$WLD/lib
PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/
ACLOCAL="aclocal -I $WLD/share/aclocal"
PATH=$WLD/bin:$PATH
XDG_RUNTIME_DIR=/tmpexport WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL PATH XDG_RUNTIME_DIR
git clone git://gitorious.org/qt/qtwayland.git
cd qtwayland
qmake
make
make install@ -
Hi postmako
Using your suggestion ./app_name -platform xcb now i get the window and it works over vnc.
Thanks -
Hi,
At last I have found a link that actually works, thanks guys. I am running the cube example on my Pi. Now I want to run a working Qt5 Windows 32 bit app on my Pi. Has anybody done this yet with Qt5? As it is suggested, can I place all the associated files on my Pi and compile the .pro project and run qmake etc or is this too simplistic?
Just a few points to make compilation a little quicker. It took me 30 hours to compile- Reduce memory share to 16
- Do not enable SSH
- Overclocked at MEDIUM level only. Could be quicker if TURBO used.
Note to run the cube example return the memory share to at least 128 otherwise nothing happens on the screen. CTRL+ALT+BACKSPACE to exit.
Thanks -
Hi,
I have run into a few problems. I have a very basic Qt5.0.1 (32 bit) project using Qt Creator 2.6.2 on my PC, simply comprising of a mainwindow.h, main.cpp, mainwindow.cpp and mainwindow.ui. The form has a single text box. There is no code, I just wanted to see the form appear on my RPI. With the projec built and showing the form on my PC, I transferred the project .pro and all files mentioned above into the opt/qt5/examples/gui folder. I compiled it, ran qmake and make. This flagged up errors about closing braces. When looking at the above files in leaf pad, they contained ascii characters, and not code text. Since I cannot inspect the mainwindow.ui code I cannot determine if this is also corrupt.
I have also attempted to transfer .png and .bmp images from my PC to my RPI which are not recognised by either Gimp 2.8 or the image viewer.
Is this a Windows versus Linux problem? Can I use Qt4 to build my form and compile it under Qt5?
Thanks -
Actually if you are using WinSCP you just use it as is. You only need to use SFTP with Filezilla. If you transferred it via USB stick then you shouldn't have any issues unless the encoding is incorrect. You may need to save them in UTF-8 format and make sure the Pi is set the same way, this shouldn't affect the binary files though so something else may be going on.
Do you have a website or some place where you could dump the files and some people here might be able to help you?
-
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.