[MeeGo-touch-dev] QML support in Meego touch Framework
Sergiy.Dubovik at nokia.com
Sergiy.Dubovik at nokia.com
Mon Jan 10 11:34:22 PST 2011
Right now qt-components are not that ready and can't be used to create applications.
Qt components will provide "meegotouch" look in pure qml eventually.
What makes sense and what not, everyone should decide himself :)
:sergiy
On Jan 10, 2011, at 9:15 PM, ext Till Harbaum / Lists wrote:
> Hi,
>
> does this really make any sense? According to the header on this page:
> http://apidocs.meego.com/1.1/platform/html/index.html
> the entire meegotouch api is discouraged for general use.
>
> So the original question is still valid: How does one write meegotouch apps through qml without using any of these apis?
>
> Till
>
> Am Montag 10 Januar 2011 schrieb Sergiy.Dubovik at nokia.com:
>> With such approach you can do very little with meegotouch.
>> It's better to do it like this:
>>
>> MApplication a(argc, argv);
>> QDeclarativeEngine engine;
>>
>> MApplicationWindow window;
>> window.show();
>> MApplicationPage *page = new MApplicationPage();
>> page->setPannable(false);
>> page->appear();
>>
>> QGraphicsObject *content = loadQmlComponent<QGraphicsObject>(engine, "myqmlfile.qml");
>> MWidget * centralWidget = new MWidget;
>> content->setParentItem(centralWidget);
>> centralWidget->setMinimumSize(864, 400);
>> page->setCentralWidget(centralWidget);
>>
>> return a.exec();
>>
>>
>> To use meegotouch components from qml you would need to register them like this:
>> QML_DECLARE_TYPE(MButton)
>> ..
>> qmlRegisterType<MButton>("com.nokia.meegotouch.native", 0, 20, "MButton");
>>
>>
>> Then in qml you could write like this:
>> import com.nokia.meegotouch.native 0.20
>>
>> Item {
>> id: rootItem
>> MButton {
>> }
>> }
>> ...
>>
>> :sergiy
>>
>> On Jan 10, 2011, at 1:27 PM, ext Apte Abhijit (Nokia-MS/Bangalore) wrote:
>>
>>> Hi,
>>>
>>> Yes, you can verify the UI using qmlviewer, but inorder to integrate your QML into Qt C++ try something like,
>>>
>>> mView = new QDeclarativeView();
>>> mContext = mView->rootContext();
>>> mContext->setContextProperty( "controller", this );
>>> mView->setSource( QUrl( "qrc:/qml/myfirstqmlapp.qml" ) );
>>> mView->setGeometry( QRect( 0, 0, 800, 480 ) );
>>>
>>> Also you've got to write a qrc file (resource file).
>>>
>>> Rgds
>>> -Abhi
>>>
>>> On 01/10/2011 04:40 PM, ext Karoliina.T.Salminen at nokia.com wrote:
>>>> Hello,
>>>>
>>>> Just a little comments: Applications are not run with qmlviewer!
>>>> Qmlviewer is a debugging app and not actual application framework!
>>>>
>>>> Br,
>>>> Karoliina
>>>>
>>>> ---
>>>> Karoliina Salminen
>>>> Technical Product Owner, MeeGo Computers
>>>> Startup Wizard, Cherry, Settings, Settings Applets, User Guide
>>>> Ruoholahti B5 open space Tel. +358 50 5686514
>>>> ----
>>>> Twitter: @karoliinasalmin
>>>> Blog: http://karoliinasalminen.wordpress.com
>>>>
>>>>
>>>> From: ext yfengying<fengying765 at hotmail.com<mailto:fengying765 at hotmail.com>>
>>>> Date: Mon, 10 Jan 2011 18:30:14 +0800
>>>> To:<johnpratss at gmail.com<mailto:johnpratss at gmail.com>>
>>>> Cc:<meego-touch-dev at meego.com<mailto:meego-touch-dev at meego.com>>
>>>> Subject: Re: [MeeGo-touch-dev] QML support in Meego touch Framework
>>>>
>>>> Hi John:
>>>>
>>>> It was supported by Meegotouch framework,
>>>>
>>>> after #zypper install qt-qmlviewer , you can launch the qml project as following:
>>>>
>>>> #qmlviewer *.qml
>>>>
>>>> BRs
>>>>
>>>> sophia
>>>>
>>>> From: john pratss<mailto:johnpratss at gmail.com>
>>>> Sent: Monday, January 10, 2011 6:15 PM
>>>> To: meego-touch-dev at meego.com<mailto:meego-touch-dev at meego.com>
>>>> Subject: [MeeGo-touch-dev] QML support in Meego touch Framework
>>>>
>>>> Hi,
>>>>
>>>> Is there a support of QML in Meegotouch framework.
>>>>
>>>> Thanks,
>>>> John.
>>>>
>>>> ________________________________
>>>>
>>>> _______________________________________________
>>>> MeeGo-touch-dev mailing list
>>>> MeeGo-touch-dev at meego.com<mailto:MeeGo-touch-dev at meego.com>
>>>> http://lists.meego.com/listinfo/meego-touch-dev
>>>> _______________________________________________ MeeGo-touch-dev mailing list MeeGo-touch-dev at meego.com<mailto:MeeGo-touch-dev at meego.com> http://lists.meego.com/listinfo/meego-touch-dev
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> MeeGo-touch-dev mailing list
>>>> MeeGo-touch-dev at meego.com
>>>> http://lists.meego.com/listinfo/meego-touch-dev
>>> _______________________________________________
>>> MeeGo-touch-dev mailing list
>>> MeeGo-touch-dev at meego.com
>>> http://lists.meego.com/listinfo/meego-touch-dev
>>
>> _______________________________________________
>> MeeGo-touch-dev mailing list
>> MeeGo-touch-dev at meego.com
>> http://lists.meego.com/listinfo/meego-touch-dev
>>
>
More information about the MeeGo-touch-dev
mailing list