黑莓 10 中的弹出窗口

Popup in BlackBerry 10

本文关键字:窗口 黑莓      更新时间:2023-10-16

如何在黑莓 10 中显示弹出窗口?我想在添加/删除/更新任何联系人时显示弹出窗口。 我采取了这样的一种方法---

void ContactEditor::showToast(QString text) {
bb::system::SystemToast toast;
toast.setBody(text);
toast.setPosition(bb::system::SystemUiPosition::MiddleCenter);
toast.exec();
}

并这样称呼---

showToast("contact added...");

还包括系统吐司的文件。

但这给了我错误----

make[2]: *** [o-g/addressbook] Error 1
make[1]: *** [debug] Error 2
make: *** [Simulator-Debug] Error 2

有人可以告诉我有什么问题吗?

LIBS += -lbbsystem添加到您的应用程序专业文件中。

#include <bb/system/SystemToast>

         SystemToast *toast = new SystemToast(this);
                                toast->setBody("Your Toast");
                                toast->setPosition(SystemUiPosition::MiddleCenter);
                                toast->show();