Please use this mailing list:

http://lists.meego.com/listinfo/meego-touch-dev

(you may want to elaborate on your question as well, as it's not
really clear what you are trying to do).

This may help as well:

http://apidocs.meego.com/mtf/class_m_pannable_viewport.html

On Wed, Oct 13, 2010 at 12:20 PM, Bob Lin <smile2...@gmail.com> wrote:
> Hi All
>
> This is my first time to ask questions here. Thanks for your time.
>
> Here is one question I have while doing the UI layout under MTF, please help
> to provide your idea.
>
> The goal : Slide the view and then show the hidden components under
> setGeometry.
>
> Issue : Use MLinearLayoutPolicy can slide to show the hidden components but
> using setGeometry bounces it back.
>
>
>
> Here is a simple code for my question.
>
>
>
> #include <MApplication>
> #include <MApplicationPage>
> #include <MApplicationWindow>
> #include <MLabel>
> #include <MLinearLayoutPolicy>
> #include <MLayout>
> #include <QObject>
>
> int main(int argc, char **argv)
> {
>     MApplication app(argc, argv);
>     MApplicationWindow window;
>     MApplicationPage page;
>
>     page.setPanningDirection(Qt::Horizontal | Qt::Vertical);
>
>     /* Create a MLayout that we set the policies for */
>     MLayout *layout = new MLayout(page.centralWidget());
>     MLinearLayoutPolicy *linearPolicy = new MLinearLayoutPolicy(layout,
> Qt::Vertical);
>
> #if 1
>     for (int i = 0; i < 20; ++i)
>     {
>         MLabel *label = new MLabel(QString("Item %1").arg(i + 1));
>         label->setAlignment(Qt::AlignCenter);
>
>         //if (i < 3)  // But only add the first 3 items to the linear policy
>             linearPolicy->addItem(label);
>
>     }
> #else
>     for (int i = 0; i < 20; ++i)
>     {
>         MLabel *label = new MLabel(QString("Item %1").arg(i +
> 1),page.centralWidget());\
>         label->setGeometry(QRectF(100,i*40,200,30));
>
>     }
> #endif
>     page.appear();
>     window.show();
>     return app.exec();
> }
>
> _______________________________________________
> MeeGo-dev mailing list
> MeeGo-dev@meego.com
> http://lists.meego.com/listinfo/meego-dev
>
>



-- 
Ville M. Vainio @@ Forum Nokia
_______________________________________________
MeeGo-dev mailing list
MeeGo-dev@meego.com
http://lists.meego.com/listinfo/meego-dev

Reply via email to