Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TToast bug? #8

Open
ixiejun opened this issue Sep 26, 2019 · 3 comments
Open

TToast bug? #8

ixiejun opened this issue Sep 26, 2019 · 3 comments
Labels
good first issue Good for newcomers

Comments

@ixiejun
Copy link

ixiejun commented Sep 26, 2019

按wiki的方法构建动态库,在使用TToast组件时出现以下异常:
qrc:/net.toou.2d/controls/TToast.qml:101: TypeError: Cannot read property of null

@ixiejun
Copy link
Author

ixiejun commented Sep 26, 2019

调用代码:
import Toou2D 1.0
...
MouseArea{ anchors.fill: parent onClicked: { TToast.showSuccess("Hi!", TTimePreset.ShortTime2s); } }
...

@ShowFL
Copy link
Owner

ShowFL commented Sep 26, 2019

你的应用现在需要初始化Toou2D运行环境。

//QML:  
//T2DWorld是T2D框架中最重要的配置
//即便什么也不配置那么也需要初始化Toou2D运行环境。
T2DWorld{
    
}

T2DWorld的父级必须是主窗体,详细用法,请参考 example / main.qml

@ShowFL ShowFL added the good first issue Good for newcomers label Sep 26, 2019
@ShowFL ShowFL pinned this issue Sep 26, 2019
@ixiejun
Copy link
Author

ixiejun commented Sep 26, 2019

完美解决,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants