Page component tutorial



  • Hi,
    I'm trying to do page component but don't know how.
    Can somebody give me a link to this component's tutorial or example code.
    I already tried tutorial on doc.qt.nokia.com but got the error like unknown type.

    Tq.





  • Yeah but why I'm get an error on Page {} that said unknown type



  • did you import Symbian components in to your qml file

    @ import com.nokia.symbian 1.0@



  • no



  • then you should do it.. this qml module imports all Qt Quick Components for Symbian in to your current qml file.



  • Sample code located at $QTDIR\Examples\4.7\qt-components\gallery

    @
    import QtQuick 1.0
    import com.nokia.symbian 1.0
    import Qt.labs.components 1.0
    ....
    TabGroup {
    height: 100
    width: parent.width - parent.spacing
    Button { id: tab1content; text: "tab1" }
    Text {
    id: tab2content
    text: "tab2"
    horizontalAlignment: "AlignHCenter"
    verticalAlignment: "AlignVCenter"
    color: platformStyle.colorNormalLight
    }
    Page {
    id: tab3content
    CheckBox { anchors.fill: parent; text: "tab3" }
    }
    }
    ....
    @



  • [quote author="changsheng230" date="1310373996"]Sample code located at $QTDIR\Examples\4.7\qt-components\gallery

    @
    import QtQuick 1.0
    import com.nokia.symbian 1.0
    import Qt.labs.components 1.0
    @[/quote]

    what is this import Qt.labs.components 1.0
    what does it have.



  • Directory of C:\QtSDK_1_1\QtCreator\bin\Qt\labs\components

    10.07.2011 17:03 <DIR> .
    10.07.2011 17:03 <DIR> ..
    10.07.2011 17:03 3,328 Checkable.qml
    10.07.2011 17:03 6,403 CheckableGroup.js
    10.07.2011 17:03 2,447 CheckableGroup.qml
    10.07.2011 17:03 <DIR> native
    10.07.2011 17:03 2,842 plugins.qmltypes
    10.07.2011 17:03 96 qmldir
    10.07.2011 17:03 25,600 qtcomponentsplugin_1_0.dll
    10.07.2011 17:03 62,464 qtcomponentsplugin_1_0d.dll
    [quote author="Vijay Bhaska Reddy" date="1310374823"] [quote author="changsheng230" date="1310373996"]Sample code located at $QTDIR\Examples\4.7\qt-components\gallery @ import QtQuick 1.0 import com.nokia.symbian 1.0 import Qt.labs.components 1.0 @[/quote] what is this import Qt.labs.components 1.0 what does it have. [/quote]



  • C:\QtSDK_1_1\QtCreator\bin\Qt\labs\components\native>ls
    AppManager.js Page.qml TabButton.qml
    ApplicationWindow.qml PageStack.js TabGroup.js
    BusyIndicator.qml PageStack.qml TabGroup.qml
    Button.qml Popup.qml TextArea.qml
    ButtonColumn.qml ProgressBar.qml TextContextMenu.qml
    ButtonGroup.js QueryDialog.qml TextField.qml
    ButtonRow.qml RadioButton.qml TextMagnifier.qml
    CheckBox.qml RectUtils.js TextSelectionHandle.qml
    CommonDialog.qml ScrollBar.qml TextTouchController.qml
    ContextMenu.qml ScrollDecorator.qml ToolBar.qml
    Dialog.qml SectionScroller.js ToolBarLayout.qml
    Fader.qml SectionScroller.qml ToolButton.qml
    ListHeading.qml SelectionDialog.qml ToolTip.qml
    ListItem.qml SelectionListItem.qml Window.qml
    ListItemText.qml Slider.qml plugins.qmltypes
    Menu.qml StatusBar.qml qmldir
    MenuContent.qml Switch.qml symbianplugin_1_0.dll
    MenuItem.qml TabBar.qml symbianplugin_1_0d.dll
    MenuLayout.qml TabBarLayout.qml
    [quote author="changsheng230" date="1310375469"] Directory of C:\QtSDK_1_1\QtCreator\bin\Qt\labs\components 10.07.2011 17:03 <DIR> . 10.07.2011 17:03 <DIR> .. 10.07.2011 17:03 3,328 Checkable.qml 10.07.2011 17:03 6,403 CheckableGroup.js 10.07.2011 17:03 2,447 CheckableGroup.qml 10.07.2011 17:03 <DIR> native 10.07.2011 17:03 2,842 plugins.qmltypes 10.07.2011 17:03 96 qmldir 10.07.2011 17:03 25,600 qtcomponentsplugin_1_0.dll 10.07.2011 17:03 62,464 qtcomponentsplugin_1_0d.dll [quote author="Vijay Bhaska Reddy" date="1310374823"] [quote author="changsheng230" date="1310373996"]Sample code located at $QTDIR\Examples\4.7\qt-components\gallery @ import QtQuick 1.0 import com.nokia.symbian 1.0 import Qt.labs.components 1.0 @[/quote] what is this import Qt.labs.components 1.0 what does it have. [/quote] [/quote]



  • tq for the info



  • I already tried import.Qt.labs.components 1.0, but it says that the package is not found.
    How do I solve this



  • I don't think you need Qt.labs.components, everything should work with com.nokia.symbian.



  • yeah I also include com.nokia.symbian and get the same error



  • did you updated your Qt SDK with experimental Symbian Qt Quick Components??


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.