Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt App rotation [solved]
I have a problem with the rotation off the app I'm building.
I am cross compiling the Qt App for the beagleboard xm, for the rotation I added to the .configure:
and to the App itself:
QWSDisplay::setTransformation(QTransformedScreen:: Rot90, 0);
but when I build I get the error:
error: incomplete type 'QWSDisplay' used in nested name specifier.
(the App without the rotation works fine:))
Can anyone help please?...
Did you forget to
before calling setTransformation ?
Thank you! :)
now it's compiling with no errors but still doesn't rotate although I launch the app with: ./myapp -qws -display transformed:Rot90
Are you doing the setTransformation and display transformed at the same time ?
I seemed to forget the '-' before the display... :/
But now when I launch the app i get:
transformd: driver not found
I don't know what do you mean by at the same time.. I added the setTransformation to the app code and compiled it and with the result I launch the app with ./myapp -qws -display transformed:Rot90.
IIRC its something like
@-qws -display "transformed:rot90:1"@
with the quotes
But I think that doing it in your code and on the command line might result in a screen rotated by 180°
I tried ./myapp -qws -display "transformed:rot90:1" and still
transformd: driver not found
I actually need 180 degrees rotation and not 90 but I'm just trying things out...
Did you install your custom compiled Qt on the board ?
What do you mean? On the bored itself I only installed qt libraries, if I didn't, the app won't work at all, right? It's working but doesn't know the display flag.
Should I install anything else?
I mean, are the libraries on the board the same that you use to compile the application ?
When I compile the application I use the quake that I compiled with the same toolchain as the board and the same gcc. What other libraries?
Ok, then the Qt you are using might have not been built with the -gfx-transformed
How can I add?
I compiled the quake with the .configure with the flag: -qt-gfx-transformed
And the application is using that quake.
Did you copy the resulting libs to your beagleboard ?
No, which libraries should I copy and to where?
If you don't have size constraints you can copy the QtEmbedded-4.X.X folder to the same place on the board (you can trim it down later once you have your application up and running)
I'm sorry, I don't understand... I have the qt-everywhere-opensource-src-4.6.2 directory where I compiled the qmake. and all the outputs are located in an out directory I chose.
In the out directory are subdirectories:
bin demos examples include lib mkspecs plugins translations
and in bin there is the qmake Im using in the Qt creator.
what should I copy and where to?
Copy the lib and plugins content on your target filesystem. Generally I let Qt install the files in the default location which is /usr/local/Trolltech/QtEmbedded-4.X.X so on the target I copy the files in the same dir.
Oh my god! I used generic Qt libraries for the beagleboard and not the ones I compiled...
Thank You SO MUCH!!!!!! It's working!
Can I ask you another question about screen rotation?
I tried to rotate the screen with:
echo 1 > /sys/class/graphics/fbcon/rotate
and the frame buffer is rotating but when i launch the Qt app it doesn't rotate...
Do you know if it's possible to rotate it that way as well?.. :)
Again, Thank you! :)
You're welcome :)
Did you start the application with the transformed stuff ?
I mean to rotate the whole frame buffer and launch the app.
When I tried to do this with the rotate file I mentioned before the OS rotates but when I launch the Qt app (without the display transformed) it's still straight.. It doesn't affect the Qt app.
You can try (maybe using ssh) to rotate the whole frame buffer after the application launch
Tried that already and it still launches straight.. :/
(The frame buffer is rotated but the qt app on top is straight)
And the transform parameter ? Doesn't have any effect ?
Doesn't effect at all.. the Qt app ignores the frame buffer rotation completely...
Might be a bug then... Did you check the "bug report system":http://bugreports.qt-project.org/issues/ to see if something similar has already been reported ?
Did now.. couldn't find anything about it..
Another test I can think of is to build your QtEmbedded for x86 with the same options and qfvb additionally and try to start your program with the same command line options directing the output to qvfb
Good idea, but I think the transposed is good enough for me now.. maybe i'll go back to that later on.
Thanks alot! :)
You're welcome !
If you have everything working now, could you update the thread title prepending [solved] ? So other forum users may know a solution has been found :)
ranshalit last edited by
n try (maybe using ssh) to rotate the whole frame buffer after the application launch
Hi Is this issue been resolved ?
I also need rotation. Does Qt does the rotate in its library or does it expect the framebuffer dirver to do the rotation ? I ask becuase our Hw/fbdev driver does not support rotation, so I wander if rotation in Qt should work.
From this thread it seems that Qt can't do the rotation without HW/framebuffer support....