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.
- The Traveler
- Posts: 403
- Joined: Sat Oct 21, 2017 3:48 pm
Re: GUI developement for rpi3 board
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.
RPi interests: Coding an Infinite Improbability Drive. In C.
Old Assembler programmers don't die. They just disassemble.
Old Assembler programmers don't die. They just disassemble.
Re: GUI developement for rpi3 board
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.The Traveler wrote: ↑Fri Jul 20, 2018 1:59 pmOption #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.
- The Traveler
- Posts: 403
- Joined: Sat Oct 21, 2017 3:48 pm
Re: GUI developement for rpi3 board
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.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.
RPi interests: Coding an Infinite Improbability Drive. In C.
Old Assembler programmers don't die. They just disassemble.
Old Assembler programmers don't die. They just disassemble.
Re: GUI developement for rpi3 board
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.
(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?)
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?)
Re: GUI developement for rpi3 board
thanks but when i saw tkinter the GUIs look doesnot good so i was thinking about PyQt, is it better option????The Traveler wrote: ↑Fri Jul 20, 2018 2:43 pmYou 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.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.
Re: GUI developement for rpi3 board
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.
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.
Memory in C++ is a leaky abstraction .
- The Traveler
- Posts: 403
- Joined: Sat Oct 21, 2017 3:48 pm
Re: GUI developement for rpi3 board
thanks but when i saw tkinter the GUIs look doesnot good so i was thinking about PyQt, is it better option????
I think you should decide what is more important, your deadline or "good looks" and make your choice. The clock is ticking ...... the project deadline is reaching near.
RPi interests: Coding an Infinite Improbability Drive. In C.
Old Assembler programmers don't die. They just disassemble.
Old Assembler programmers don't die. They just disassemble.
Re: GUI developement for rpi3 board
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:Heater wrote: ↑Tue Jul 24, 2018 5:48 pmTypically 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.
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.
Re: GUI developement for rpi3 board
hem,
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.'
No. Please read what I wrote again.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
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.'
Memory in C++ is a leaky abstraction .