Hi,

I seem to have found a workaround that works for my version (which is a bit 
newer than the one you have). Just don’t set the “flat” property for the 
button. It should be flat by default anyway and not setting it seems to fix the 
problem.

-Mikael

From: qt-components-bounces+ext-mikael.fagerlund=nokia....@qt.nokia.com 
[mailto:qt-components-bounces+ext-mikael.fagerlund=nokia....@qt.nokia.com] On 
Behalf Of Fagerlund Mikael (EXT-Accenture/Salo)
Sent: 26 March, 2012 12:36
To: owe...@gmail.com
Cc: qt-components@qt.nokia.com
Subject: Re: [Qt-components] ToolButton of Qt Symbian Component: checked 
property does not work as preset

Hi,

I got your bug, but unfortunately I don’t believe smart installer will update 
qt quick components to the version that is now under development. In any case, 
this bug just missed a release window and it will take a long time before it is 
released. So in your case I would implement some sort of workaround instead of 
waiting for a fix. Especially as you can’t be sure of all devices having a 
fixed version even if the fix is released via a firmware update. I’m sorry that 
we can’t get it fixed and released faster.

-Mikael

From: ext 肇鑫 [mailto:owe...@gmail.com]<mailto:[mailto:owe...@gmail.com]>
Sent: 26 March, 2012 11:25
To: Fagerlund Mikael (EXT-Accenture/Salo)
Cc: qt-components@qt.nokia.com<mailto:qt-components@qt.nokia.com>
Subject: Re: [Qt-components] ToolButton of Qt Symbian Component: checked 
property does not work as preset

Hi,

I have filed the bug in bugtrack of qt-project.org<http://qt-project.org>. I 
guess we donot need to wait for the symbian firmware update, as we have smart 
installer. We can use smart installer to upgrade the qt symbian component in 
phones, can't we?

Owen
2012/3/26 
<ext-mikael.fagerl...@nokia.com<mailto:ext-mikael.fagerl...@nokia.com>>
Hi,

You have found a bug. The ToolButton highlight is currently not shown if the 
button is pre-checked. I will fix it but it will take quite a while before the 
fix is released through an update to the Symbian devices. Unfortunately I 
cannot find any easy workaround for the issue so the only way to fix it in your 
case is to implement your own highlight or ToolButton. You can find the source 
for our implementation as well as the images used from our git-repository:
https://qt.gitorious.org/qt-components/qt-components

-Mikael

From: 
qt-components-bounces+ext-mikael.fagerlund=nokia....@qt.nokia.com<mailto:nokia....@qt.nokia.com>
 
[mailto:qt-components-bounces+ext-mikael.fagerlund<mailto:qt-components-bounces%2Bext-mikael.fagerlund>=nokia....@qt.nokia.com<mailto:nokia....@qt.nokia.com>]
 On Behalf Of ext ??
Sent: 24 March, 2012 11:28
To: qt-components@qt.nokia.com<mailto:qt-components@qt.nokia.com>
Subject: [Qt-components] ToolButton of Qt Symbian Component: checked property 
does not work as preset

Hi,

As it says in
http://doc.qt.nokia.com/qtquick-components-symbian-1.1/qml-toolbutton.html#checked-prop

If checked is false, the button appears as normal or "up". If checkable and 
checked are both true, and the button is not being pressed, the button appears 
as "down" or "checked".

Note: if checkable is true, the value of checked will be updated dynamically as 
the button is pressed and released.

Note: If the button contains just an icon, and the flat property is true, the 
checked button will have a distinctive appearance (when not pressed), whilst 
still appearing to be flat.
However, in my code, when the app runs, either of the ToolButtons show the 
checked state, which is a lightbeam behind the icon of toobar.
The muteToolButton needs to press once to show the checked state. This is 
correct.
The vibrationToolButton needs to press twice to show the checked state, first 
is unchecked, second is checked. This is not correct. The checked state is 
supposed to show with the app launches.

Any ideas?

My code:
import QtQuick 1.1

import com.nokia.symbian 1.1

PageStackWindow {

    id: window

    initialPage: MainPage { x: 0; y: 0;tools: toolBarLayout }

    showToolBar: true


    ToolBarLayout {

        id: toolBarLayout

        ToolButton {

            flat: true

            iconSource: "toolbar-back"

            onClicked: window.pageStack.depth <= 1 ? Qt.quit() : 
window.pageStack.pop()

        }

        ToolButton {

            id:muteToolButton

            flat: true

            iconSource: "mute.svg"

            checkable: true

            checked: false

        }

        ToolButton {

            id:vibrationToolButton

            flat: true

            iconSource: "vibrate.svg"

            checkable: true

            checked: true

        }

        ToolButton {

            flat:true

            iconSource: "about.svg"

            onClicked: aboutDialog.open()

        }

    }



}



--

Owen Zhao



--
肇鑫
Owen Zhao
tel/miliao:18602412580
qq:66975918
msn:hutig...@hotmail.com<mailto:msn%3ahutig...@hotmail.com>
_______________________________________________
Qt-components mailing list
Qt-components@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-components

Reply via email to