Showing posts with label Qt. Show all posts
Showing posts with label Qt. Show all posts

Thursday, January 9, 2020

Thursday, March 17, 2016

Qt - Building Performant SDKs for Embedded Devices - feat. Raspberry Pi 2



by QtStudios

Learn how to develop C++/QML applications using Qt Creator IDE, while harnessing the full capabilities of the hardware with targeted cross-compiled build of Qt. This webinar will enable you to get the most out of the devices support out of the box with Qt for Device Creation and create highly performing SDKs for your own device of choice.

During the webinar, we will present:

* An overview of porting to an embedded device
* Highlight the importance of leveraging full hardware acceleration (OpenGL ES, vfp), hardware curser support
* Demonstrate custom Qt Wayland backend implementation for performance improvements
* How to create an integrated Qt SDK for a target device & cross compile Qt conveniently for any device
* Give guidance through the configure requirements required to get a performant version of Qt

We will demonstrate the performance of Qt on a Raspberry Pi 2, which is packaged for both the Rasbian & Arch Linux distributions & shipped with full Qt Creator integration and basic Wayland compositor to leverage OpenGL for hardware acceleration. Find an unparalleled development experience through a step by step process from integrating Qt with, but not limited to, the Raspberry Pi 2 to offloading more computational work on to the Pi hardware to free precious developer resources for ambitious projects.

Over 3 years ago, Qt was integrated on the Raspberry Pi, which included full hardware acceleration (OpenGL ES 2, vfp), hardware cursor support and a custom Qt Wayland backend implementation using Broadcom APIs. Although completed & publicly documented, packaging Qt in an optimal fashion has not been easy for a new user where mesa GL, no floating point unit usage, no Wayland, X11 standardization and on device compilation brings tears to any informed developers' eyes.


Friday, April 17, 2015

Install Qt5 on Raspberry Pi/Raspbian and Hello World


Updated@2016-02-27: 
For Raspbian Jessie, qt5-default (Qt 5 development defaults package) is included in default repository. Refer the updated post "Install Qt5/Qt Creator for Raspberry Pi 2/Raspbian Jessie".

A member mentioned in the post on raspberrypi.org forums that there are "backports" packages of Qt5 you can install.



Edit the file: /etc/apt/sources.list and add:
deb http://twolife.be/raspbian/ wheezy main backports
deb-src http://twolife.be/raspbian/ wheezy main backports

Install the required key:
$sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 2578B775

Then get Qt5 and esoteric requirements installed:
$ sudo apt-get update
$ sudo apt-get install qt5-default qt5-qmake libegl1-mesa libgles2-mesa



Hello World Qt5 on Raspberry Pi/Raspbian (console application)

- Create a directory, for example, named helloworld. And change to it.
- Create a cpp file, named helloworld.cpp.

#include <QCoreApplication>
#include <QDebug>
#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("Qt Version %s\n", QT_VERSION_STR);
    QCoreApplication app(argc, argv);
    qDebug() << "Hello Qt5"; 
    return app.exec();
 
}

Make it with Qt5:
$ qmake -project
$ qmake
$ make


Hello World Qt5 on Raspberry Pi/Raspbian (with GUI widgets)

- Create a directory, for example, named helloqt5. And change to it.
- Create a cpp file, named helloqt5.cpp.

#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>
#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("Qt Version %s\n", QT_VERSION_STR);
 
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello Qt5");
    label->show();
    return app.exec();
}

Make it with Qt5:
$ qmake -project
$ qmake
$ make

Now you have some error reported. Like this:

helloqt5.cpp:(.text.startup+0x1c): undefined reference to `QApplication::QApplication(int&, char**, int)'
helloqt5.cpp:(.text.startup+0x50): undefined reference to `QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>)'
helloqt5.cpp:(.text.startup+0x60): undefined reference to `QWidget::show()'
helloqt5.cpp:(.text.startup+0x64): undefined reference to `QApplication::exec()'
helloqt5.cpp:(.text.startup+0x70): undefined reference to `QApplication::~QApplication()'
helloqt5.cpp:(.text.startup+0x84): undefined reference to `QApplication::~QApplication()'


Now open and edit helloqt5.pro, add the line "QT += widgets":

TEMPLATE = app
TARGET = helloqt5
INCLUDEPATH += .

QT += widgets

# Input
SOURCES += helloqt5.cpp


Now re-make the project:
$ qmake
$ make


Wednesday, March 25, 2015

Tuesday, October 22, 2013

Build Qt 5 for Raspberry Pi on Raspberry Pi


This tutorial from Qt Project guide you how to Native Build of Qt 5 on a Raspberry Pi.

There are many tutorials online for building Qt5 on the Raspberry Pi, but all or most of those tutorials are for using a desktop machine to cross compile the binaries for the Raspberry Pi. You will not be able to run qmake and make on the Raspberry Pi itself if you cross compile. This tutorial is meant to show you how to natively compile Qt 5 on the Raspberry Pi so that you can use qmake and make on the Raspberry Pi itself without cross compiling or relying on an external desktop...

Caution: As stated in the document, the building process run on a Raspberry Pi overclocked running at 900 MHz, it took 38 hours to compile and the temperature was a steady 51 C – 54 C...!!!

Saturday, October 19, 2013

Qt on Raspberry Pi


This presentation introduces the Raspberry Pi, a low cost computing platform. It discusses how it can be used as a development platform for Qt and describes the current status of Qt 4 and Qt 5 on Raspberry Pi.

Start with an overview of what the Raspberry Pi is, the non-profit foundation behind it’s development, and a description of the hardware and software it supports.

Then look at Qt on the Raspberry Pi, including the QtonPi Linux distribution and device program. Also look at the state of Qt versions 4 and 5 on the Raspberry Pi platform.

Recorded at the Qt Developer Days in Berlin in 2012.

Slides available at http://qtconference.kdab.com/node/25