Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. A problem with a ToolButton in Qt Quick Symbian Component, QML CommonDialog Element, it doesn't respond on first click but on second click!
Forum Updated to NodeBB v4.3 + New Features

A problem with a ToolButton in Qt Quick Symbian Component, QML CommonDialog Element, it doesn't respond on first click but on second click!

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GeekProgramer
    wrote on 20 Jun 2012, 18:38 last edited by
    #1

    Hi every one,
    in the code shown bellow, i really can't see what's wrong with it, it's simply checks the password and shows hint messages when the password is incorrect when the button is clicked, the problem that it doesn't do any thing when the button is clicked for the first time but works fine when it's clicked for the second time!!
    @CommonDialog {
    id: root
    privateCloseIcon: true // show close button in the right corner of dialogs title
    titleText: qsTr( "Confirm password to continue" )

    property bool showClearPassword:     false
    property string msgPasswordIncorrect: qsTr( "Password incorrect!" )
    property bool exFlag: false
    titleIcon: ""
    
    function launch(exitFlag) {
        paswd.text=""
        exFlag=exitFlag
        hintArea.forceClose()
        open()
      }
    //to use only one button with own onClicked handler
    buttons: Item {
        id: buttonContainer
    
        LayoutMirroring.enabled: false
        LayoutMirroring.childrenInherit: true
    
        width: parent.width
        height: privateStyle.toolBarHeightLandscape + platformStyle.paddingSmall * 2
    
        Row {
            id: buttonRow
            objectName: "buttonRow"
            anchors.centerIn: parent
            spacing: platformStyle.paddingMedium
    
            ToolButton {
                id: btOk
                text: qsTr( "Ok" )
                onClicked: {
                    // check  password
                    hintArea.forceClose()
                    if( paswd.text!== settingsFile.password ){
                        hintArea.show( msgPasswordIncorrect )
                        console.log("dialog entery1")
                    }else {
                        if(exFlag){
                            pageStack.push(Qt.resolvedUrl("Settings.qml"))
                            accept();
                            console.log("dialog entery2")
                        }else{
                            Qt.quit()
                        }
                    }
                }
            }
        }
    

    }@

    Please Note that this issue doesn't show on simulator but when i deploy and test on the device, I'm testing this using Nokia700 device.

    1 Reply Last reply
    0

    1/1

    20 Jun 2012, 18:38

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved