hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

GUI developement for rpi3 board

Fri Jul 20, 2018 1:55 pm

I want to build GUI for rpi board, i thought Qt will be best option as suggested in some forums and websites, but i am struggling too much with it, although i have cross compiled it and i am still getting errors in deployment.

I am seeking for advice regarding GUI developement on rpi3 board. I have follwoing option:
1. i should go with Qt installed on rpi itself but some says that it takes long to compile it on rpi board.
2. I should write GUI in python using Tkinter
3. I can also used windows based GUi developed in Visual C# and using mono i can use GUI on rpi

any other way if you know please suggest me some. the project deadline is reaching near. please help.

User avatar
The Traveler
Posts: 361
Joined: Sat Oct 21, 2017 3:48 pm

Re: GUI developement for rpi3 board

Fri Jul 20, 2018 1:59 pm

Option #2 would be the most straightforward and it's pretty simple to use. Tkinter has had Python support for a lot of years so it's well documented and stable. As you have a deadline, Tkinter presents far fewer hurtles to overcome.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: GUI developement for rpi3 board

Fri Jul 20, 2018 2:22 pm

The Traveler wrote:
Fri Jul 20, 2018 1:59 pm
Option #2 would be the most straightforward and it's pretty simple to use. Tkinter has had Python support for a lot of years so it's well documented and stable. As you have a deadline, Tkinter presents far fewer hurtles to overcome.
but i have few things to ask then why people prefer Qt over python for GUI development also i want to ask that will it be possible to make high end GUIs for rpi using tkinter?? i want to show maps and location etc using rpi with some input data coming from UART port all this possible?? i want to assure these things are possible or not as i am new to this field.

User avatar
The Traveler
Posts: 361
Joined: Sat Oct 21, 2017 3:48 pm

Re: GUI developement for rpi3 board

Fri Jul 20, 2018 2:43 pm

but i have few things to ask then why people prefer Qt over python for GUI development also i want to ask that will it be possible to make high end GUIs for rpi using tkinter?? i want to show maps and location etc using rpi with some input data coming from UART port all this possible?? i want to assure these things are possible or not as i am new to this field.
You said you have a deadline to meet ... yes, tkinter can be used to display quite a bit of diverse information. The ability to do so depends more on your ability to code solutions for your problems, not the GUI elements. You could use Qt, or Kiva: https://kivy.org/#home, or any number of GUI toolkits.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

B.Goode
Posts: 6456
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: GUI developement for rpi3 board

Fri Jul 20, 2018 6:10 pm

If you have a deadline to meet you need to start writing code with a toolkit that is known to work with Raspbian on the RPi.

guizero https://lawsie.github.io/guizero/about/ meets that description.
What is guizero?
It is a Python 3 library for creating simple GUIs
It is a wrapper for the standard Tkinter library (included by default when Python is installed)
Aims
The aim of guizero is to make the process of creating simple GUIs quick, accessible and understandable for new learners.


(But dealing with asynchronous inputs under the control of a graphical toolkit is possible but not straightforward, and setting a target of a 'high-end' GUI might be unrealistic for your first project?)

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: GUI developement for rpi3 board

Sat Jul 21, 2018 9:24 am

The Traveler wrote:
Fri Jul 20, 2018 2:43 pm
but i have few things to ask then why people prefer Qt over python for GUI development also i want to ask that will it be possible to make high end GUIs for rpi using tkinter?? i want to show maps and location etc using rpi with some input data coming from UART port all this possible?? i want to assure these things are possible or not as i am new to this field.
You said you have a deadline to meet ... yes, tkinter can be used to display quite a bit of diverse information. The ability to do so depends more on your ability to code solutions for your problems, not the GUI elements. You could use Qt, or Kiva: https://kivy.org/#home, or any number of GUI toolkits.
thanks but when i saw tkinter the GUIs look doesnot good so i was thinking about PyQt, is it better option????

Heater
Posts: 9841
Joined: Tue Jul 17, 2012 3:02 pm

Re: GUI developement for rpi3 board

Tue Jul 24, 2018 5:48 pm

Typically I develop GUI apps using the Qt GUI libs and the qtcreator IDE.

qtcreator makes getting started with layout of buttons dialog boxes etc, etc, very easy. Drag and drop.

Typically I do all that development on a Linux running PC or laptop. When the code looks good I copy the source to the Pi and build it there. Just a qmake and make command.

Of course Pi specific parts for handling GPIO etc cannot be developed on a PC. So I created stubs that allow building and testing on the PC.

The Pi specific parts can be developed on the Pi easily enough, they are not generally very big.

User avatar
The Traveler
Posts: 361
Joined: Sat Oct 21, 2017 3:48 pm

Re: GUI developement for rpi3 board

Tue Jul 24, 2018 6:05 pm

thanks but when i saw tkinter the GUIs look doesnot good so i was thinking about PyQt, is it better option????
... the project deadline is reaching near.
I think you should decide what is more important, your deadline or "good looks" and make your choice. The clock is ticking ...
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

hem
Posts: 15
Joined: Thu May 31, 2018 7:25 am

Re: GUI developement for rpi3 board

Wed Jul 25, 2018 6:30 am

Heater wrote:
Tue Jul 24, 2018 5:48 pm
Typically I develop GUI apps using the Qt GUI libs and the qtcreator IDE.

qtcreator makes getting started with layout of buttons dialog boxes etc, etc, very easy. Drag and drop.

Typically I do all that development on a Linux running PC or laptop. When the code looks good I copy the source to the Pi and build it there. Just a qmake and make command.

Of course Pi specific parts for handling GPIO etc cannot be developed on a PC. So I created stubs that allow building and testing on the PC.

The Pi specific parts can be developed on the Pi easily enough, they are not generally very big.
i am also trying the same but for that you have to cross compile the code for rpi so that i can code on PC with QT creator and deploy code on rpi using ssh, i am facing problem in deployment i am getting error. i did all cross compilation stuff after following the guide:

https://wiki.qt.io/RaspberryPi2EGLFS

but after deployment when i tried to run the executable file on i PC i get follwoing error.

relocation error: ./hello: symbol _ZTVN10_cxxabiv120_si_class_type_infoE, version Qt_5 not defined in file libQt5core.so.5 with link time reference.

can you tell me how you did it ??? haven't you got any kind of this error and what are the commands you used to download qt libraries on rpi, i have used QT 5.10.1 on my linux PC, rpi3 board.

your help will be of great significance for me as i am struggling a lot with this.

Heater
Posts: 9841
Joined: Tue Jul 17, 2012 3:02 pm

Re: GUI developement for rpi3 board

Wed Jul 25, 2018 8:58 am

hem,
i am also trying the same but for that you have to cross compile the code for rpi so that i can code on PC with QT creator and deploy code on rpi
No. Please read what I wrote again.

I do not cross-compile qt applications on a PC and then move the resultiong executables to the Pi to run.

Rather, I build qt applications on a PC as PC apps. When the code is looking good and tested somewhat on the PC I move the source code to the Pi and rebuild it there. Only requires qmake and make commands.

In short I deploy the source code not cross compiled executables.

Now, if you are talking about building the actual Qt libs that is another question.

In the past I have built Qt5 libs on the Pi itself (Because Qt5 was not available in Jessie or whatever Raspbian version).

To build Qt 5 on the Pi itself I used the uinstructions here: https://wiki.qt.io/Native_Build_of_Qt5_ ... spberry_Pi

This takes a long time to build but you only have to do it once. Then you can copy the libraries around from Pi to Pi for new deployments.

The build results in a Qt system that is usable from X as normal or directly into the frame buffer (no X required). Also has accelerated OpenGL in the frame buffer.


Note that the instruction for cross-copiling Qt do result in a Qt that is used without X.

'This is not intended for running desktop-style, windowed Qt apps under X11, but rather for the real embedded/device creation use case where the Qt app runs fullscreen on top of dispmanx/EGL using the Broadcom drivers.'

raysan5
Posts: 37
Joined: Tue Sep 30, 2014 4:44 pm
Location: Barcelona
Contact: Website

Re: GUI developement for rpi3 board

Mon Sep 10, 2018 7:47 am

You can take a look to raylib and its raygui module.

I use them for small tools development and they work on RPI, really high-performant.

Return to “Graphics programming”

Who is online

Users browsing this forum: No registered users and 2 guests