×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    66

    InfoBanner is not working in Qml code

    Hello Friends,
    I am trying to show info banner in my app, i also import com.nokia.extras 1.1, but there is still InfoBanner is not recognizing..there is hint "could not resolve the prototype ImplicitSizeItem of InfoBanner"

    Pls..tell me how can i resolve this issue?????

  2. #2
    Registered User
    Join Date
    Nov 2011
    Posts
    48

    Re: InfoBanner is not working in Qml code

    Are you trying to anchor, position or size it?

    InfoBanner component does not inherit Item so you cannot control its position or size.

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    66

    Re: InfoBanner is not working in Qml code

    No..i am using like this...
    Page{

    InfoBanner{
    id: banner
    text: "This is an info banner with no icon"
    }

    // Create an info banner with icon


    function showBanner1() {
    // set display time to 5000 ms, default is 3000 ms
    // banner.timeout = 5000;
    // display info banner
    //banner.open();
    banner.show();

    }

    function showBanner2() {
    // disable "self-dismissing" timer, banner has to be dismissed manually
    banner.timeout = 0;
    // interactive infobanner. click signal will be triggered when clicked.
    banner.interactive = true
    // display info banner
    banner.open();
    }

    function closeBanner() {
    // close info banner manually
    banner.close();
    }



    }

  4. #4
    Registered User
    Join Date
    Nov 2011
    Posts
    48

    Re: InfoBanner is not working in Qml code

    Does the error appear during the page initialization or on a function call?

    Something's very wrong with your InfoBanner properties and methods... Here is the component reference:
    http://harmattan-dev.nokia.com/docs/...3&q=InfoBanner

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    66

    Re: InfoBanner is not working in Qml code

    No...i am not getting any error, but at the same time Banner is also not showing in my application on Real device(N9). But on Simulator it is working fine. Please help Urgent
    Last edited by Yogesghpatel; 2012-05-17 at 16:38.

  6. #6
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: InfoBanner is not working in Qml code

    Hi,

    I tried with this code in MainPage.qml and it works for me in device with PR1.2. I can see info banner coming up without any issues in device when clicking the button.

    import QtQuick 1.1
    import com.nokia.meego 1.0
    import com.nokia.extras 1.0

    Page {
    tools: commonTools

    Label {
    id: label
    anchors.centerIn: parent
    text: qsTr("Hello world!")
    visible: false
    }

    InfoBanner {
    id: banner
    text: "This is an info banner with no icon"
    }



    Button{
    anchors {
    horizontalCenter: parent.horizontalCenter
    top: label.bottom
    topMargin: 10
    }
    text: qsTr("Click here!")
    onClicked: //label.visible = true
    banner.show();
    }
    }

  7. #7
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: InfoBanner is not working in Qml code

    its obvious that the difference is:
    on symbian there is open() method for showing InfoBanner and on MeeGo, the method is show()
    have no idea why Nokia did this in such way

    the w/o for this is to wrap open() method:

    InfoBanner {
    function show() {
    open()
    }
    }

    in some wrapper component

Similar Threads

  1. QtComponents with MeeGo Harmattan problem - InfoBanner
    By molbal in forum [Archived] Qt Quick
    Replies: 3
    Last Post: 2011-08-02, 19:41
  2. Code not working!!!!
    By Priya23 in forum Symbian
    Replies: 2
    Last Post: 2009-08-21, 03:40
  3. Replies: 1
    Last Post: 2006-12-02, 11:54
  4. SDK code not working!
    By dan_symbian in forum Symbian
    Replies: 0
    Last Post: 2006-08-28, 09:21
  5. SMS working example code ????
    By skdas in forum Symbian
    Replies: 5
    Last Post: 2003-06-11, 05:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •