[SailfishDevel] Errors while instantiating a Dialog

Андрей Кожевников coderusinbox at gmail.com
Tue Aug 2 10:18:16 UTC 2016


Open help article and check how dialog header should be used.

02 авг. 2016 г. 14:36 пользователь "Marcin Mielniczuk" <
marmistrzmar at gmail.com> написал:
>
> Hi,
>
> Doesn't help for me. And now the column and the header overlap.
>
>
> On 02.08.2016 10:32, Michael Neufing wrote:
>>
>> Hi Marcin,
>>
>> you should not put DialogHeader into a Column but directly into the
Dialog.
>> That should solve your problem.
>>
>> Br,
>> Michael
>>
>> Am 02.08.2016 10:29, schrieb Marcin Mielniczuk:
>>>
>>> Hi,
>>>
>>> I copied the Dialog sample code from the doc:
>>>
>>> import QtQuick 2.0
>>> import Sailfish.Silica 1.0
>>>
>>> Dialog {
>>>     property string name
>>>
>>>     Column {
>>>         width: parent.width
>>>
>>>         DialogHeader { }
>>>
>>>         TextField {
>>>             id: nameField
>>>             width: parent.width
>>>             placeholderText: "What's your name?"
>>>             label: "Name"
>>>         }
>>>     }
>>> }
>>>
>>> I want the Dialog to modify some properties of `MainPage.qml`
>>> onAccepted, so I instantiated it.
>>>
>>> import QtQuick 2.0
>>> import Sailfish.Silica 1.0
>>>
>>> Page {
>>>     id: page
>>>
>>>     /* some code, some SilicaFlickable, etc. */
>>>
>>>     MyDialog {
>>>
>>>     }
>>> }
>>>
>>> Then I get the following errors in the log:
>>>
>>>  p, li { white-space: pre-wra
>>>
>>> [W] unknown:189 -
>>> file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:189 [1]:
>>> TypeError: Cannot read property 'backIndicatorDown' of null
>>>
>>> [W] unknown:194 -
>>> file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:194 [2]:
>>> TypeError: Cannot read property 'backIndicatorDown' of null
>>>
>>> [W] unknown:247 -
>>> file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:247 [3]:
>>> TypeError: Cannot read property 'forwardIndicatorDown' of null
>>>
>>> [W] unknown:242 -
>>> file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:242 [4]:
>>> TypeError: Cannot read property 'forwardIndicatorDown' of null
>>>
>>> The same happens when I push the Dialog directly to the pageStack.
>>> What have I done wrong? Apart from those errors, the dialogs seems to
>>> work correct...
>>>
>>> --
>>> Marcin
>>>
>>>
>>> Links:
>>> ------
>>> [1] file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:189
>>> [2] file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:194
>>> [3] file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:247
>>> [4] file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:242
>>> _______________________________________________
>>> SailfishOS.org Devel mailing list
>>> To unsubscribe, please send a mail to
devel-unsubscribe at lists.sailfishos.org
>>
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
devel-unsubscribe at lists.sailfishos.org
>
>
> --
> Marcin
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
devel-unsubscribe at lists.sailfishos.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20160802/50897356/attachment.html>


More information about the Devel mailing list