Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Newbie:Doubt on QML coding.



  • Dear all,

    I am a newbie in Qt.
    I have symbian application development background.

    I need to learn more on QML.

    My doubt is when i try to run some sample codes given in the tutorial,keywords like 'Background','MediumText','Button' etc are not taking,compilation error occured(showing as "Background is not a type").
    On top of the code i have added import Qt 4.7 ,anything else is required.

    please help me..
    tnks in advance,
    remesh



  • MediumText, Button are not standard components of QML you need create this components first before use it, check this article "Getting Started Programming with QML":http://doc.qt.nokia.com/4.7-snapshot/gettingstartedqml.html , is a good starting point



  • [quote author="remeshothera" date="1292950685"]Dear all,

    I am a newbie in Qt.
    I have symbian application development background.

    I need to learn more on QML.

    My doubt is when i try to run some sample codes given in the tutorial,keywords like 'Background','MediumText','Button' etc are not taking,compilation error occured(showing as "Background is not a type").
    On top of the code i have added import Qt 4.7 ,anything else is required.

    please help me..
    tnks in advance,
    remesh[/quote]

    Which is the above mentioned sample you are referring to.



  • Most likely the sample includes files such as 'Background.qml'

    If you have a Background.qml in the same directory, 'Background' becomes a type you can use in other QML files.



  • Thank u all for u r quick response....

    One more doubt to clarify...

    Is it possible to access system capabilities like Camera,Telephony,Calender etc using QML?

    If yes plz give me the documentation..
    thanks,
    remesh



  • The documentation (and implementation) isn't 100% complete yet, but here you go:
    http://doc.qt.nokia.com/qtmobility/qml-plugins.html

    For instance, I couldn't find documentation for the Camera QML object, but here's an example that uses it:
    http://doc.qt.nokia.com/qtmobility/declarative-camera.html



  • [quote author="remeshothera" date="1293086324"]Thank u all for u r quick response....

    One more doubt to clarify...

    Is it possible to access system capabilities like Camera,Telephony,Calender etc using QML?

    If yes plz give me the documentation..
    thanks,
    remesh[/quote]

    QML is mostly recommended for UI. So you can try a combination of Qt C++ and QML to access the said system capabilities.



  • thanks once again...



  • There are so many articles available in this web for the new developer, So, you can try it.

    And also run the code.And start developing.



  • [quote author="qtrahul" date="1293090092"]There are so many articles available in this web for the new developer, So, you can try it.

    And also run the code.And start developing. [/quote]

    Its obvious from his post that he tried to run the code and started development using QML.


Log in to reply