[Solved]Crash application with ButtonStyle QtQuickControls
-
[quote author="onek24" date="1394106796"]
Could you please try the text with an empty string?:
@text: ""
text: qsTr("")@[/quote]
Its work. -
-- delete --
-
Yes that happens because of:
bq. If strCharSet points to a string of zero length, the function returns string.
Reference: "strstr":http://msdn.microsoft.com/en-us/library/aa273008(v=vs.60).aspxIt looks like in line 0x76d2d88b it nulls al and tries to copy it(null) into edi in line 0x76d2d89f. Maybe the nulling happens because the stylesheet requires a own Text for it so your text moves into no Text or null. Could you please try this workaround:
@ Button {
style: ButtonStyle {
background: Rectangle {
implicitWidth: 100
implicitHeight: 25
border.width: control.activeFocus ? 2 : 1
border.color: "#888"
radius: 4
gradient: Gradient {
GradientStop { position: 0 ; color: control.pressed ? "#ccc" : "#eee" }
GradientStop { position: 1 ; color: control.pressed ? "#aaa" : "#ccc" }
}
Text {
text: "A button"
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
}
}@
or this one:
@ Button {
style: ButtonStyle {
background: Rectangle {
implicitWidth: 100
implicitHeight: 25
border.width: control.activeFocus ? 2 : 1
border.color: "#888"
radius: 4
gradient: Gradient {
GradientStop { position: 0 ; color: control.pressed ? "#ccc" : "#eee" }
GradientStop { position: 1 ; color: control.pressed ? "#aaa" : "#ccc" }
}
}
}
Text {
text: "A button"
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}@ -
[quote author="onek24" date="1394108948"]
@Button {
style: ButtonStyle {
background: Rectangle {
implicitWidth: 100
implicitHeight: 25
border.width: control.activeFocus ? 2 : 1
border.color: "#888"
radius: 4
gradient: Gradient {
GradientStop { position: 0 ; color: control.pressed ? "#ccc" : "#eee" }
GradientStop { position: 1 ; color: control.pressed ? "#aaa" : "#ccc" }
}
Text {
text: "A button"
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
}
}@
[/quote]Of course its work, but... its like hack :D. Anyway thanks. I think its bug.
-
[quote author="Nexelen" date="1394110035"]
Of course its work, but... its like hack :D. Anyway thanks. I think its bug. [/quote]
Well it's the only solution/workaround i know. Also its not a hack, it's an improvement because you can format the text further, like with font.pixelsize: and so on. -
[quote author="onek24" date="1394108948"]
It looks like in line 0x76d2d88b it nulls al and tries to copy it(null) into edi in line 0x76d2d89f. Maybe the nulling happens because the stylesheet requires a own Text for it so your text moves into no Text or null. [/quote]I dont understand why it use library for 64-bit application... For 32-bit library in forlder System32.
-
I don't know eather, sorry.
So the workaround works and you are using it? If you find the solution or why the error occures please provide us the answer, thank you.
-
[quote author="onek24" date="1394115182"]
So the workaround works and you are using it? [/quote]
Yep. Thank you =). Ill try build Qt5.3 also I will look as there. -
You're welcome, glad i could help you with that. :)
You could report this bug to "Bugreports":https://bugreports.qt-project.org/secure/Dashboard.jspa . Maybe it'll help you or other people. -
In Qt5.3 (mscv2013-64bit) its works :)