defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.camera"
Do you have gstreamer installed?
Yes, version 1.14.5 on VM and version 1.10.4 on Pi.
Call this before you instantiate Q*Application:
This is error doesn't show but the other one remains. I really have no clue on how to proceed.
Thanks so much for the quick answer
In config.txt, uncomment back the two lines you commented out:
#Enable DRM VC4 V3D driver on top of the dispmanx display stack
To build Qt, use the linux-rasp-pi4-v3d-g++ device
Boot into run-level3 (multi-user.target), i.e. without a window manager.
Set environment variables:
export QT_QPA_EGLFS_INTEGRATION = eglfs_kms
export QT_QPA_EGLFS_PHYSICAL_WIDTH = 520
export QT_QPA_EGLFS_PHYSICAL_HEIGHT = 330
(What this means, see here https://doc.qt.io/qt-5/embedded-linux.html)
Launch your application with the option
I found the problem. I used the broadcomm opengl libs in /opt/vc. However on the Raspberry 4 I should have used those: libegl1-mesa-dev libgbm-dev libgles2-mesa-dev mesa-common-dev. in order to use kms/drm
what you're trying to do here is comparing a QString with a double value, that can't work, those are fundamentally different.
You'll have to first convert the string to a double. The QString class offers a build in function for that:
you should use that first
Edit: snapped by @jsulm 😉
I'm able to mostly work around this issue by explicitly calling setSpacing(0); on my layout objects. Seems they inherit a property that is inconsistent between arm and x86 versions of the library. This still is not fixing this case:
uint16_t width = metrix.boundingRect(label->text()).width();
if (width > maxWidth)
QString clippedText = metrix.elidedText(text, Qt::ElideRight, maxWidth);
where the clippedText returned is incorrect (much shorter than needed) on the arm arch version.
But I can work around this one more issue for now.
@Mohit-Tripathi that is correct,
Like @jsulm said, QByteArray only accepts char as it lowest form.
You have to assign the 1st index the high byte and the 2nd index (of the byte array) the Low byte (or flipped, depending on endianness )
That said, your previous int to hex string conversion is unneeded and probably wrong too.
Good to read that your problem has been solved.
Please mark post as solved then.
[edit:koahnig] Not sure if there is an issue with the forum. Possibly it is already marked as solved, but it is clearly shownb as unsolved for me. However, the entry under "Topic Tools" would allow only "Mark as Unsolved".
Ah, I see what you are doing here.
When does the user select the device: before or after the discovery?
If it's before discovery, no need to do a discovery at all. Connect immediately.
If during the discovery, no need to wait for finished() at all, connect as soon as user selects it (stop the discovery first) .
SOMETIMES, this will not be a configuration issue as mentioned in other answers. In my case, the problem was one file that happened to have been saved with a .CPP extension rather than .cpp. QMake (Qt5) was misidentifying the file and trying to compile it with the C compiler rather than the C++ compiler. The QMake from Qt4 was not exhibiting this issue. Renaming the file fixed the issue.
My comment at the time was "Could this really be that f&%%& simple!!"
the problem solved
my phone display size setting was on smallest mode
the emoji quality is fine only on normal display size (It should not be smaller or bigger)
This means that anyone using my app must always have a standard display size and I have to force them to do that.
But in AndroidStudio isn't like this
Some good news, I fixed the fonts by manually creating the font folder and transferring the fonts to the RPI.
In regards to the touchscreen, I ended up observing that the touchscreen worked on the application for the most part. When I use the touchscreen on the app, the touch event occurs in a different location on the interface from where I touched. I want to think that it is a calibration issue but when I exit the application, touchscreen events work as intended. Could it be an issue with EGLFS?
I am still wondering if I need EGLFS to run or if there is a second option that I can explore.
Anyways, I am running v4.19.83-v7+
@Surendar-Dharani as mentioned by @maxwell31 regarding libraries, you may want to take a look at step #15 from this guide (I know it's related to cross-compilation, but that step may apply to your issue).
Here is the same post in official forum:
Also here they talk about the same and give guidance about how to do it using cross compilation.
From the posts, the legacy proprietary driver is no more supported on the rpi4.
Currently, mesa drivers are needed for v3d to get acceleration and desktop is needed.
Some one has a an official or standard way to compile Qt for rpi4 to get acceleration?.
Like dependencies and mkspecs.
I'll try a native compilation using mesa and post about it.