Hot answers tagged

26

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.


13

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 ...


10

In Raspbian Stretch Lite the following worked for me: sudo apt-get update sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools


8

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/...


5

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.


4

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 ...


4

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.


3

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 ...


3

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.


3

Python 3.4.2 is the Python3 version used in jessie. If you are using wheezy I suggest you upgrade to jessie. If you are using something else you should include that information in your question.


3

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: [Unit] Description=My Qt Project Service [Service] Type=simple User=pi ...


2

Anything compiled for ARMv6 should work on the RPi2. Raspbian is still based on ARMv6 and the tool chain I use to remotely develop for the Pi 2 is the one I use for earlier Pi models.


2

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 ...


2

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


2

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)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/...


2

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: http://forum.qt.io/topic/67942/failed-cross-compile-bad-architecture


2

In my case this fixed the issue sudo ln -s /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 /usr/lib/arm-linux-gnueabihf/libGLESv2.so


2

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 and 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 ...


2

sudo apt-get install libqtgui4 worked for me. HTH


2

I found a way to avoid the crash: Compiling Qt with libinput support and using libinput instead of evdev.


2

I found the answer here. Turns out the best scenario was available. OpenCV has a method for acquiring mjpeg streams. Perfect! Here is the same code, adapted to my setup: #include <stdio.h> #include <opencv2/opencv.hpp> #include <iostream> int main(int, char**) { cv::VideoCapture vcap; cv::Mat image; const std::string ...


2

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 ...


2

I update Raspbian Buster and the problem was solved. From the original Author.


2

Maybe a Queue could work for you? Link. Queues are FirstInFirstOut so you could have your threads putting stuff in it and then have, I don't know, a fourth thread that will be grabbing stuff from the queue as they come and write them to the file. Hope this helps.


1

To start a script or program in the desktop as a normal user (not as root), you can make a desktop file in the ~/.config/autostart folder: Adafruit: adding vncserver autostart


1

You can try steps mentioned below. It will take some time to make and make install. Please be patient. sudo apt-get install qt5-default wget https://www.riverbankcomputing.com/static/Downloads/sip/4.19.24/sip-4.19.24.tar.gz tar -xzvf sip-4.19.24.tar.gz cd sip-4.19.24 python configure.py make make install cd ../ wget https://www.riverbankcomputing.com/...


1

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) ...


1

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) ...


1

Add this to your code before calling wiringPiSetup(): setenv("WIRINGPI_GPIOMEM", "1", 1);


1

If you are using netbeans use the below steps. Open the properties of your project Select "Run" 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 ...


Only top voted, non community-wiki answers of a minimum length are eligible