PInch Zoom
-
Does anyone knows how to implement Pinch Zoom in Qt? this link
http://qt-project.org/doc/qt-4.8/touch-pinchzoom-main-cpp.html can't help me because i can't find classes like viewport() etc. Has anyone experience about that ?
Thanks. -
What are you interested in? QGraphicsView or QtQuick?
In QtQuick, you just need to use PinchArea element. No need to implement anything special.
-
I have a widget with image. And i want to use it on android.! In the example i have i my first post.. i can't understand what's happening. furthermore i get the error error: QGraphicsScene: No such file or directory
thanks for fast reply! -
The include is wrong, it should be:
@
#include <QGraphicsView>
@ -
i am sorry i paste the wrong sentence. yes i used #include <QGraphicsView> and get this error..
-
Add #include <QGraphicsScene> too, then ;) Or the whole <QtGui>, to make things simpler and slower.
-
i tried!. useless.! it is very bad that they upload a non working example.!! nevertheless my intention is to user pinch zoom, despite the fact that the example is wrong
-
Please, before blaming others make sure you are not doing something wrong. Maybe you are using Qt 5, and not Qt 4 (this example is for Qt4, which does not support Android at all).
-
I am using Qt 5.1.1 and i am trying to compile first for desktop. this #include <QGraphicsView> is not working on Qt 5 ? Is there any example for Qt5 pinch and android ?
-
You may be missing the include of widgets in your .pro file. it is required in Qt5 if you are using widgets. That is why your header include is not working. Add this to your .pro file:
@
QT += widgets
@Transition from Qt 4 to Qt 5 is easy in general, but it might be hard for newcomers. I recommend only using examples for the version you are using.
-
I agree with you. Is there any example for Qt 5.1.1 ? for this purpose ?
-
Sorry, I don't know, I did not have any need for it yet.
-
Did you use pinch zoom for android in Qt 5.1.1 ? Anyone else tried to do it ?
-
No, last time I've tried was with Qt 4.8 and Necessitas Android port. Worked flawlessly (but in QML, not QWidgets), and I suspect the same is true for Qt 5. I have not seen any bugs reported on that.
-
I know.. but i can't change the whole application to QML now.. it will duplicate the work hours.
-
Finally i make the pinchzoom example work on android. Simulator and real device. The problem is that i want to transfer the functionality of pinchzoom to my app which is working with PinchZoom example.
-
It is good to share what the problem was. Other people may have the same problem.
-
the problem is QT += widgets in the .pro file. Clean - qmake - rebuild and then run. Now i am trying to copy the functionality to my project. I will keep all people here get informed.
8/18