Pyqt5 QtVirtualKeyboard raspberry pi 4 buster lite EGLFS cannot be mixed - pyqt5

I'm trying to add QtVirtualKeyboard to my standalone application. My app running without desktop but i don't think this is the problem. I found that we can integrate to my QMainWindow a QObject that show the keyboard along my app. I also found that it possible to use QQuickView and inputPanel, but sincerely, im not sure how to make it. Anyone can help?
To make it "works" i used this topic Install QtVirtualkeyboard in raspberry-pi? then i have installed QtVirtualKeyboard with this commandsudo apt install qtvirtualkeyboard-plugin. I said "work" because if i didn't install with apt, my application did nothing.

Related

Problem running a PyQt5 project in WSLg - no application window shows up

I am running WSL2 under Windows 10.
If I type "gedit &" into the WSL console, the Gedit application window pops up. Thus I assume that WSLg properly works.
Next, I am trying to run the following PyQt5 project:
https://github.com/rafaelpadilla/review_object_detection_metrics
However, no application window pops up this time, although no error message appears either.
First of all, I do wonder whether this could work at all with WSL!?
Appendix for additional context:
I am not using conda because of licensing issues, but a combination of pyenv + poetry instead. First I had problems with a missing library (libxcb.so), which I could solve by running "sudo apt python-pyqt5". Now everything seems to work, except from no application window being shown.
UPDATE:
I tried with "/src/pyqt-official/qtdemo/qtdemo.py" from the official PyQt Examples github repository and I observed exactly the same issue.
There is no error message. Last prompt informs me that the "xcb plugin was loaded“, then nothing happens. In particular, no window is showing up.
Some related observations:
(1) I haven't yet updated my grafics card driver to support vGPUs. However, Gedit works and opens in a separate window.
(2) Unless I do "sudo apt install python3-pyqt", I receive an error message saying that it cannot find "libxcb.so". However, I am running the code in a virtual pyenv/poetry environment, which is separate from the system python installation. I don't understand why "sudo apt install python3-pyqt" makes a difference here. Shouldn't installing "PyQt5" with poetry obtain a wheel that comes with all libraries already compiled? I don't understand how all of this is playing together.
Open Questions:
Do you think the driver issue could be an explanation? I actually cannot imagine that. I thought it is only about better performance for OpenGL applications.
Can you explain observation (2)?
What else can I do?
First of all, I do wonder whether this could work at all with WSL!?
I can't tell you if that particular application will run under WSL, but my expectation is that it will. As far as I can tell in its dependencies there doesn't seem to be any reliance on GPU compute. That, to me, would be the trickiest part to configure under WSL (but is still typically possible). However, there may be other dependencies (not covered below) that you need to get running before the application can work.
What I can confirm is that PyQt works under WSL just fine. However, keep in mind that a default Ubuntu installation under WSL is based on a non-GUI Ubuntu Server distribution, rather than standard Ubuntu (with a desktop and GUI).
This means that Ubuntu Server is often missing system level libraries needed for GUI support, which appears to be the case here.
I don't understand why "sudo apt install python3-pyqt" makes a difference here. Shouldn't installing "PyQt5" with poetry obtain a wheel that comes with all libraries already compiled?
Poetry and/or Pip manage the Python library dependencies, but those Python libraries still require the native system library dependencies. That's where sudo apt install python3-pyqt5 comes in. Under a desktop Ubuntu system, most of these libraries would already be in place. However, with Ubuntu Server/WSL, they aren't.
For reference, here's my configuration. On a freshly initialized Ubuntu 22.04 WSL2 distribution:
sudo apt update && sudo apt upgrade -y
sudo apt install python3-venv python3-pyqt5
mkdir -p src/pyqt_test
cd src/pyqt_test
python3 -m venv .venv
source .venv/bin/activate
pip install pyqt5
I was then able to create and run the following, taken from Learn Python PyQt:
import sys
from PyQt5 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
windows = QtWidgets.QWidget()
windows.resize(500,500)
windows.move(100,100)
windows.show()
sys.exit(app.exec_())
The window displayed correctly.

How do I create an installer package for mono built on Raspberry Pi

I have a Raspberry Pi model B that I just bought. I downloaded and built the complete Mono source code to try to solve the hard float issue because supposedly a developer just committed a fix in the 3.2.7 version.
I have done the build and it worked without errors. I would now like to create a package or tarball or something that I can use to take what I just built and install it on other RPi devices.
Can someone tell me how to do this?

How to install OpenNI 1.x on a Mac?

I have a Kinect for Windows and I would like to connect it to my Mac laptop with OSX 10.7.5.
I would like to use openNI as the driver.
OpenNI's website lists "OpenNI 2.1 Beta (OS X)" however the source-code page does not list install instructions. Are they found someplace else?
There are install instructions on the OpenNI 1.x github page and on OpenNI 1.x Unstable branch page. The instructions for the two branches are slightly different, however neither have worked for me.
I originally had XCode 4.6 installed. Both instructions state they want XCode 4.3.2, which I installed, renamed XCode 4.6 and used "sudo xcode-select -switch" to switch between them.
Both instructions ask for "libusb-devel +universal" and in both cases I get:
Error: Please do not install this port since it has been replaced by 'libusb'.
Error: org.macports.configure for port libusb-devel returned:
Please see the log file for port libusb-devel for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libusb-devel/libusb-devel/main.log
Error: Processing of port libusb-devel failed
If I continue with the installation of "libusb +universal" instead, then the rest of the dependencies install fine (though I had to install GraphViz before Doxygen).
But then when I run: "./RedistMaker" I get a lot of warnings, though it does create a Final file. "sudo ./install.sh" runs fine and I'm guessing OpenNI is installed, but then I get a bunch more errors when trying to install Sensor.
Can anyone help tell where along the way should I have started to worry? Do I need to manually install libusb (which I have tried to do)?
Any help appreciated!
I fixed the installation of OpenNI by running these instructions:
> sudo rm -f /opt/local/lib/libusb-1.0.0.dylib
> sudo port clean libusb
> sudo port install libusb +universal
Basically the Mac install instructions need to be updated and should include a warning that the short install may leave files around that will need to be deleted before installing with port.

Can I use Kinect on a Mac?

Studying vision, I would like to play with the Microsoft Kinect.
Can I use it on my Mac?
I have not found any Library for Mac and fear virtualization on my laptop to use Linux.
I've accessed Kinect data on OSX using openframeworks and the ofxKinect addon (which uses libfreenect and libusb).
It's not the only option, just I've used and worked 'out of the box'.
Try downloading the Zigfu Dev Bundle for mac (http://www.zigfu.com) - that should get you up to speed with kinect development on mac.
Using Kinect on Mac is as easy as ordering Latte.
But there is also a lot of confusion on the Internet and sites that seem to be old and give you the wrong advice such as installing a separate sensor library in addition to OpenNI. Just go to the basic website and download SDK for your MAC:
http://www.openni.org/openni-sdk/
You might need to have prerequsities though I assume you have already installed them, such as:
sudo port install libtool
sudo port install doxygen
restart comp
sudo port install libusb-devel +universal
Troubleshooting:
"sudo rm -f /opt/local/lib/libusb-1.0.0.dylib"
"sudo port clean libusb"
"sudo port install libusb +universal"
No need to compile anything. You should be able to run ./Samples/Bin/SimpleViewer right away after you run sudo ./install.sh.The PROBLEM might be that you have already tried to run it unsuccessfully and put a camera in the wrong state. I have seen errors such as USB intercase cannot be set etc. as a side effect.
Running your code in Eclipse is a different story and may require a few extra steps and changing your Ubuntu code (using openni namespace, different includes, etc.)

Install mod_mono on Mac OSX

I just started to develop website with mono+asp.net mvc2 on mac osx but I am quite new to mono and mac.
I have got things working from MonoDevelop. My website is running ok with XSP when I run it from MonoDevelop.
Now, I am trying to test it from Apache server, but I don’t know how to set things up. Some instruction I can found are all very old or incomplete. I tried a few of them, but none worked.
Could anyone please help me out?
The best way to install mod_mono on OS X is from source. To do this there are a couple steps.
First, make sure you've installed XCode (which can be found on the DVD or the 2nd CD that came with the machine or the App Store) which will provide you with gcc and the rest of the standard toolchain.
Most of the normal in-between steps can be skipped, assuming you've already installed Mono and MonoDevelop from their stable release packages. If you encounter an error later on, you'll want to install updated versions of XSP and Mono and try again.
Next, download the latest stable release of mod_mono, extract the contents of the archive (by double clicking on the icon) and follow steps 1, 2 & 3 in the INSTALL file, and you should be good to go. This entire process took about ~5 minutes to get up and running :)
I am a novice with mono but followed some instructions. I downloaded and installed everything from here:
http://www.go-mono.com/mono-downloads/download.html
To get Apache to work with mod_mono.so I downloaded source from this page:
http://download.mono-project.com/sources/mod_mono/
You have to compile it. I went into the unpacked directory and wrote this in termminal:
./configure --prefix=/usr
make
sudo make install
This puts the mod_mono.so in correct Apache dir and the mod_mono.conf file. To include it you must add this to your httpd.conf (I put it at the end of the file):
# mod_mono_configuration
Include /etc/apache2/mod_mono.conf
MonoServerPath /Library/Frameworks/Mono.framework/Versions/Current/bin/mod-mono-server2