[英]Popup in BlackBerry 10
How do I show a popup in Blackberry 10? 如何在Blackberry 10中显示弹出窗口? I want to show popup when any contact is added /deleted/updated.
我想在添加/删除/更新任何联系人时显示弹出窗口。 I took one method like this---
我采取了这样的一种方法
void ContactEditor::showToast(QString text) {
bb::system::SystemToast toast;
toast.setBody(text);
toast.setPosition(bb::system::SystemUiPosition::MiddleCenter);
toast.exec();
}
and called like this--- 然后这样称呼
showToast("contact added...");
included file for System Toast also. 还包括System Toast的随附文件。
but this is giving me error---- 但这给了我错误-
make[2]: *** [o-g/addressbook] Error 1
make[1]: *** [debug] Error 2
make: *** [Simulator-Debug] Error 2
can somebody tell me whats the problem ? 有人可以告诉我是什么问题吗?
Add LIBS += -lbbsystem
to your application pro file. 将
LIBS += -lbbsystem
添加到您的应用程序专业文件中。 and include 并包括
#include <bb/system/SystemToast>
SystemToast *toast = new SystemToast(this);
toast->setBody("Your Toast");
toast->setPosition(SystemUiPosition::MiddleCenter);
toast->show();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.