tvservice is not the best to turn off and on the screen.
Much better way to do this (found after a day of searching) is using vcgencmd command (more on this here).
vcgencmd display_power 0 turns off the screen
vcgencmd display_power 1 turns on the screen
This allows the Qt application to be visible on the screen after turning it off and back on.
OK... I managed to get this to work. This is what I did.
QT Core needs to be installed with
sudo apt-get install qt5-default
You'll need to copy over sip and PyQt5 to your Raspberry Pi (I used SFTP). Just put the tar files someplace that you can get to them easily.
You'll need to extract each of them, using the tar command, with the -xzvf tag so you'll ...
It's a usual linux and Unix problem, nothing Pi-related. Here is the problem: your libs need to be symlinked. Do sudo -s and become a root for such an operation. And let's troubleshoot it!
First, find them, like this:
# find / -name libEGL* -type f
# find / -name libGLESv2* -type f
and do this linking to the full paths to files like this:
# ln -fs /path/...
Here is a working way to install Qt5. For Qt5 there is no need for dev-tools. So this command is not relevant:
sudo apt-get install qt4-dev-tools
The two commands needed to install Qt5 fully are:
sudo apt-get install qt5-default (installs Qt version 5.7.1)
sudo apt-get install qtcreator
Hope this helps.
You did a couple things wrong. First off, running sudo pip install python-qt5 made Python2.7's pip download. You can in future avoid this with py -3 -m pip install python-qt5. py is a very useful tool when you have multiple Python versions.
The next thing you did wrong was copying the Python2.7 modules to your Python3.x lib, most modules (especially big ...
Generally a good idea is to do a search on the Pi.
apt-cache search pyqt5
Perhaps the command you need is
sudo apt-get install python3-pyqt5
I suggest you always preferentially use apt-get rather than pip.
I guess you are using Raspbian Stretch. This comes with systemd so you should start your qt project as service. First create a new service:
rpi3 ~$ sudo systemctl edit --force --full my_qt_project.service
Insert this statements with your settings, save them and quit the editor:
Description=My Qt Project Service
Raspbian jessie appears to have qt5 in the repository. If you're still on Wheezy, you can upgrade it through this tutorial.
$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
If you want I wrote a GPL-licensed QtMultimedia backend providing hw acceleration to QML elements like MediaPlayer and VideoOutput. Look here: http://thebugfreeblog.blogspot.it/2013/04/hardware-accelerated-qtmultimedia.html.
Your natively compiled app is running on EGL instead of X (QT_QPA_EGLFS_PHYSICAL_WIDTH is used by EGLFS, a qt plugin for EGL). When you run a QT app in X, X passes input events to your app. On EGL qt works a little differently and interfaces directly with evdev. Its possible you need to configure it before it works properly.
Personally I've been trying to ...
I'm going through the same thing. You need to use the 4.9.2 compiler:
Look under arm-bcm2708 for the arm-rpi-4.9.3-linux-gnueabihf folder.
I still haven't been able to cross-compile QT for Pi3, but I'm working on it.
My adventure can be found here:
I developed a similar application using PyQt4 and Qt4-designer. You have to install pyqt4 all modules:
sudo apt-get install qt4-default qt4-designer qt4-doc qt4-dev-tools python-qt4
So in your case just change all 4-5 i.e qt4 -- qt5.
Not particularly sure why you are trying to install that package, the App Note for installing Qt Creator on Raspberry Pi says to install
sudo apt-get install qt4-dev-tools
sudo apt-get install qtcreator
Some extra packages are also listed.
I personally keep Qt Creator on my PC which can compile programs a lot faster during development and then ...
I found a solution although this is not the straightforward way to compile all at once.
First I compiled and installed Qt 5.12.4 without the MySQL driver plugin as described in the tutorial referenced in my original question.
I'm not sure if this next step is really required, but then I created symbolic links to redirect from MySQL to MariaDB in order to ...
I can't leave a comment, not enough reputation, but thought I should mention this in case it helps anyone using VirtualEnv:
In my case (Raspbian on a Raspberry Pi 3, Python 3 in a virtual environment) the answer provided by CharlieHorse is the only one which worked as I could not get
sudo apt-get install
to install into virtual environments. I tried ...
I had the same problem and I discovered that was my fault, I mean you have to check the return value of a function and manage it in case of error.
In this case the function bcm2835_spi_begin(); returns operation status, as you can see in the documentation:
Start SPI operations. Forces RPi SPI0 pins P1-19 (MOSI), P1-21 (MISO),
P1-23 (CLK), P1-24 (CE0) ...
You have two* different options when launching a QT program on RasPi, you can either run it on the EGLFS (Extended Graphics Library Full Screen) platform which is the default platform your program will run from when you launch it from command line. This is what you are seeing in the second image.
Alternatively you can run it on the XCB (X C Bindings) ...
If you are using netbeans use the below steps.
Open the properties of your project
Select "Manage Platforms..."
Select the Remote Java SE platform you created
In the "Platform Properties" section, click the field next to "Exec Prefix"
Type in "sudo" (without the double quotes)
Optionally test again the platform
Close the dialogue box
If you ...
After having a conversation with Alan and Scott (hidapi contributors) I realized, that I used the hidapi-libusb implementation. After switching and linking to the hidapi-hidraw implementation it runs fine:
LIBS += -lhidapi-hidraw
The libusb implementation of hidapi boots off any other kernel driver on the device. When linking against the hidraw ...
You don't install the complete Qt toolset on the target , but on your development machine .
Install Qt and Visual Studio on your desktop machine.
Read this guide : https://doc.qt.io/qt-5/winrt-support.html
The error clearly states that the problem is that the compiler is missing bcm_host.h. You should be able to fix this by installing libraspberrypi-dev.
The command below should fix it.
sudo apt-get install libraspberrypi-dev
You may be following an out of date tutorial and installing screen software which is no longer relevant.
Support for at least some Adafruit 2.8" touchscreen displays is built in to the later versions of Raspbian with a recent kernel.
Look in /boot/overlays/README on your Pi.
Info: Adafruit PiTFT 2.8" resistive ...
I had exactly the same happening, but I managed to fix it. I now have a Qt 5.5 app running straight from command line with correct touch screen. Hope this helps you guys.
I have the same Adafruit screen with the AR1100 board in between.
Problem is that the AR1100 sends mouse events instead of touch events.
Following solution worked for me and turned out as ...