Solved Rotate Qt app in framebuffer.
-
Hello.
Is there a way to rotate a Qt application running in linux framebuffer?
I tried run it with:./app -platform linuxfb:fb=/dev/fb0:rotation=180
but is't not rotated.
Thanks. -
Hi,
Looks like you would need to apply the patch you can find here to the linuxfb backend. It's the first one on the list.
-
xrandr extension? https://www.x.org/wiki/Projects/XRandR/
-
@SGaist said in Rotate Qt app in framebuffer.:
Hi,
Looks like you would need to apply the patch you can find here to the linuxfb backend. It's the first one on the list.
Can you tell me how exactly I should do it? I downloaded the patch and not sure what I should do next. Where do I put it? To the qt directory where the configure file is? Then I should run the commands:
git init git apply --stat <patch_name> git apply --check <patch_name> git am --signoff < <patch_name>
?
And then recompile the whole Qt?
Thanks. -
This post is deleted! -
@Piotrrr said in Rotate Qt app in framebuffer.:
Then I should run the commands:
git init
git apply --stats <patch_name>
git apply --check <patch_name>
git am --signoff < <patch_name>?
And then recompile the whole Qt?Yes, did you try?
-
Yes, and after git apply --check I get:
error: recipes-qt/qt5/qtbase_git.bb: No such file or directory
I don't have anywhere in my qt dir file named qtbase_git.bb. I downloaded qt with:
sudo wget http://download.qt.io/archive/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz
-
@Piotrrr I think you can remove "diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb" part from the patch.
-
After removing "diff" I still get the problem because at lines 208-209 there are:
--- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb
which have the same directory. Of course can't remove these because then I get:
error: patch fragment without header at line 209: @@ -31,6 +31,8 @@ SRC_URI += "\
-
Make a file only containing the part relevant to 0001-Fix-the-qt5.6-linuxfb-ratation-problem.patch
Then apply that smaller patch.
-
I'm not sure which lines I can remove and which I shouldn't. I removed everything between line with "+2.7.4" (line 125) and the last line in the file with "+PR = "r2"". The commands with "--stat" and "--check" passed but at the
git am --signof < fileName
I get output:meta-qt5-qtbase-Fix-the-qt5-linuxfb-ratation-problem.patch:28: trailing whitespace. meta-qt5-qtbase-Fix-the-qt5-linuxfb-ratation-problem.patch:40: trailing whitespace. meta-qt5-qtbase-Fix-the-qt5-linuxfb-ratation-problem.patch:50: trailing whitespace. meta-qt5-qtbase-Fix-the-qt5-linuxfb-ratation-problem.patch:68: trailing whitespace. meta-qt5-qtbase-Fix-the-qt5-linuxfb-ratation-problem.patch:74: trailing whitespace. warning: squelched 9 whitespace errors warning: 14 lines add whitespace errors.
Did this apply succeded? Can I now recompile Qt?
-
If you do a git diff what do you get ?
If you see the changes required then just go and build. -
When I do git diff I get nothing, I built it but nothing has changed, rotation still doesn't work.
-
Then the patch was not applied.
That thing is really simple. If you do not manage to apply it, do the corresponding changes yourself in the files.
-
Then I'll try do it yourself. Thanks for the help.
Edit:
I made the changes myself and it works, app rotates. Thanks once again. -
can you please send a link to the patch the url doesn't work!