Unsolved Is Qt the wrong software for me?
-
In the last few days I've tried to get used to Qt and learn the basics of QML. But the more I look at examples and start to develop the UI I want to make, I doubt that Qt is what I'm looking for.
I have a 3D Printer with a Raspberry attached to it. I bought a Touch Screen for the PI and want to develop a GUI for it. The GUI should be like a installation wizard, for example:
First Window: Home Screen with some basic printer info and a start print button
Second Window: Chose between the different available models
Third Window: Reminder for the user to close the printer door etc
Fourth Window: Print statusThis is just an example i think I have about 7 windows. Every window should have a "home" and a "back" button at the button. But as far as the examples I watched so far, Qt isn't really made for opening new windows.
Maybe I should make my design more like the example "Qt Quick Extras - Gallery"? Or should I use another program? i think I'm confused as to what the possibilities and limitations of Qt are.One more thing. On my Laptop I was able to install the newest Version of Qt. But on my Raspberry I was only able to install Qt 5.3.2 I tried three different installing options but I wasn't able to install the newest Version. Is this due to the Kernel Version of the Raspberry? I have a Pi B+ with Raspbian 4.4.21
-
Hi
Im only using qt Widgets so i have not used QML but as far as i know, it's not a issue to have windows.
https://doc-snapshots.qt.io/qt5-5.7/qml-qtquick-window-window.html#details -
@MilloMille What other Qt versions did you try to install and how?
The problem is not Linux kernel, the problem is the CPU architecture: RPi has an ARM CPU, so you cannot install Qt binaries provided by the Qt project (which are built for Intel CPUs). If you need a newer Qt version than 5.3.2 then you will have to compile it by yourself. -
@MilloMille said in Is Qt the wrong software for me?:
I bought a Touch Screen for the PI and want to develop a GUI for it. The GUI should be like a installation wizard, for example:
First Window: Home Screen with some basic printer info and a start print button
Second Window: Chose between the different available models
Third Window: Reminder for the user to close the printer door etc
Fourth Window: Print statusThis is just an example i think I have about 7 windows. Every window should have a "home" and a "back" button at the button. But as far as the examples I watched so far, Qt isn't really made for opening new windows.
What you've described is fully achievable in Qt.
See the "Qt 5 Everywhere" demo, which shows Qt powering a multi-page GUI like what you described, including the Home/Back buttons:
If you have an Android or iOS device, you can install the demo and play with it yourself.
If you have neither, open the Google Play Store link anyway -- there's a video showing people interacting with the GUI on different touchscreens.
(Note: The more correct term is "Page", not "Window")
Maybe I should make my design more like the example "Qt Quick Extras - Gallery"?
Yes, the Gallery is a good reference.
The most important component that lets you switch between different pages is the StackView.
One more thing. On my Laptop I was able to install the newest Version of Qt. But on my Raspberry I was only able to install Qt 5.3.2 I tried three different installing options but I wasn't able to install the newest Version. Is this due to the Kernel Version of the Raspberry? I have a Pi B+ with Raspbian 4.4.21
It sounds like your version of Raspbian comes bundled with Qt 5.3.2. Here are the instructions to build the latest version of Qt from scratch:
You might also be able to get more detailed help from the Raspberry Pi community.
-
@mrjj said in Is Qt the wrong software for me?:
Hi
Im only using qt Widgets so i have not used QML but as far as i know, it's not a issue to have windows.
https://doc-snapshots.qt.io/qt5-5.7/qml-qtquick-window-window.html#detailsThanks a lot this looks like a good solution. I hope I can make it work like this
@jsulm said in Is Qt the wrong software for me?:
@MilloMille What other Qt versions did you try to install and how?
The problem is not Linux kernel, the problem is the CPU architecture: RPi has an ARM CPU, so you cannot install Qt binaries provided by the Qt project (which are built for Intel CPUs). If you need a newer Qt version than 5.3.2 then you will have to compile it by yourself.This sounds plausible. I tried to to install it from the represetory through apt-get, I treid to colone it from github and I downloaded the offline installer (online installer didn't work).
@JKSH said in Is Qt the wrong software for me?:
See the "Qt 5 Everywhere" demo, which shows Qt powering a multi-page GUI like what you described, including the Home/Back buttons:
Thanks for the tip. This demo look really nice. Its also similar to the Qt Quick Extra Gallery example.
It sounds like your version of Raspbian comes bundled with Qt 5.3.2. Here are the instructions to build the latest version of Qt from scratch:
You might also be able to get more detailed help from the Raspberry Pi community.
I tried cross compiling for the Raspberry Pi in multiple ways. The guide you linked was one of them. Unfortunatelly I ran into multiple errors when running the code as described (it was at the section compiling qtbase). the first one I could fix but after that I gave up. Another guide I used compiled without errors, but when I inserted the SD card into the raspberry I couldnt start the UI (only the console worked) and even the most basic commands didnt work (sudo, apt-get, etc. didnt work)
Since cross comiling didnt work, I installed the same Version of Qt on ym Raspberry and on my Laptop and plan on copy pasting the code to the Raspberry. Then I will compile the code on my Pi. I hope that will work -
@MilloMille said in Is Qt the wrong software for me?:
but when I inserted the SD card into the raspberry I couldnt start the UI (only the console worked) and even the most basic commands didnt work (sudo, apt-get, etc. didnt work)
What operation system do you have on that SDCard? If it is Raspbian then it should work. How did you set-up the operating system?
-
@jsulm said in Is Qt the wrong software for me?:
What operation system do you have on that SDCard? If it is Raspbian then it should work. How did you set-up the operating system?
I followed this guide:
Cross Compile Qt5 für Raspberry PiEverything went without warnings or errors. But when I inserted the SD card and startet the PI, It didnt load the UI even though I downloaded the Raspbian with Pixels image. Like I said, I was unable to do anthing in the shell, there were just a few commands the shell knew (like ls), when I typed sudo or apt-get I would get "unknown command"
@JKSH said in Is Qt the wrong software for me?:
The most important component that lets you switch between different pages is the StackView.
In the documentation it says I need to import QtQuick.Contorls1.4 which should be available since Qt5.1. I have Qt 5.3.2 on my Raspberry but I can only use QtQuick.Controls<=1.2
-
@MilloMille Something is wrong with your Raspbian installation. apt-get should work:
$ sudo apt-get update
And by default Raspbian has an UI.
-
@jsulm said in Is Qt the wrong software for me?:
@MilloMille Something is wrong with your Raspbian installation. apt-get should work:
$ sudo apt-get update
And by default Raspbian has an UI.
Well you could also install Raspbian Lite which doesnt have an UI. But I definitly used the image with UI. But even if I in the Lite version i should be able to use the standart commands
Btw, I posted the wrong link.
Cross Compiling for Raspberry with buildroot -
@MilloMille said in Is Qt the wrong software for me?:
even the most basic commands didnt work (sudo, apt-get, etc. didnt work)
...
when I typed sudo or apt-get I would get "unknown command"
If even those super basic commands aren't working, that means something has gone terribly wrong. You'll need to get the core Linux bits working first, before you start thinking about GUIs.
If you load a pure, unmodified Raspbian image (without Qt) onto the SD card, are you able to control the system via the shell?
-
@MilloMille said in Is Qt the wrong software for me?:
even the most basic commands didnt work (sudo, apt-get, etc. didnt work)
...
when I typed sudo or apt-get I would get "unknown command"
If even those super basic commands fail, that means something has gone terribly wrong. You'll want to get the core Linux bits working first, before you start building your own GUIs.
If you load a pure, unmodified Raspbian image (without Qt) onto the SD card, are you able to use those basic commands?
-
@JKSH said in Is Qt the wrong software for me?:
If even those super basic commands fail, that means something has gone terribly wrong. You'll want to get the core Linux bits working first, before you start building your own GUIs.
If you load a pure, unmodified Raspbian image (without Qt) onto the SD card, are you able to use those basic commands?
Yes the image alone works perfectly fine. I also have another SD card with Raspbian and Qt installed (via apt-get) but this SD card isn't set up for cross compiling. I tried to cross compile with buildroot, a software that was recommended to me, but evertime I try to copy the buildrrot kernel I get the same result everytime.
But anyway, I think we are getting way of topic. I will try to fix this problem and if I can't I will start another thread. Thanks for your time and help tho.Just one more question: How long do you think it will take someone who has no experience with Qt (me) to develop something like the "Qt Quick Extras - Gallery" example
-
@MilloMille said in Is Qt the wrong software for me?:
but this SD card isn't set up for cross compiling.
If I'm not mistaken, an SD card doesn't need to be "set up" in a special way for cross-compilation.
You simply need a cross-compiling toolchain that's compatible with Raspbian Jessie on ARMv7. Use it to compile the libraries you want, and then copy the cross-compiled libraries into your SD card.
Just one more question: How long do you think it will take someone who has no experience with Qt (me) to develop something like the "Qt Quick Extras - Gallery" example
Hmm... that kind of depends on what experience you have with other tools, and how well you adapt to new software development technologies :)
What technologies have you used before to create interactive programs?