[MeeGo-touch-dev] How to move image freely

Bob Lin smile2bob at gmail.com
Mon Oct 25 00:30:38 PDT 2010


Hi All

First, Thanks for watching my question.

I'd like to have a image to be moved freely like other touch based image
viewer, but It seems MImageWidget can't satisfy my need. It only provides
Horizontal moving and Vertical moveing.
Maybe I missed something to enable free move, or I should use other widget?

Here is a very simple example to show you how I use MImageWidget as below:

int main(int argc, char **argv)
{
    MApplication app(argc, argv);
    MApplicationWindow window;
    MApplicationPage page;

    page.setPanningDirection(Qt::Horizontal | Qt::Vertical);
    page.centralWidget()->setMinimumSize(1000,1000);

    MImageWidget *image = new MImageWidget(page.centralWidget());
    image->setImage(QImage("./lilly.jpg"));

    page.appear();
    window.show();
    return app.exec();
}

Thanks for your time.
-Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.meego.com/pipermail/meego-touch-dev/attachments/20101025/30d97adf/attachment.html>


More information about the MeeGo-touch-dev mailing list