我是黑莓级联的新手,正在尝试我的通话功能。 但是在运行我的示例程序后,出现以下错误:
import bb.cascades 1.4
import bb.system.phone 1.0
Page {
Container {
layout: StackLayout {
}
Button {
id: callButton
text: "Call me"
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
onClicked: {
phone.requestDialpad("(519) 555-0100")
}
}
}
attachedObjects: [
Phone {
id: phone
}
]
}
和我的.pro文件
LIBS += -lbbsystem
我面临的错误是:module "bb.system.phone" is not installed
我的程序正在加载,但会显示黑屏。 任何帮助将不胜感激。 提前谢谢。
答案 0 :(得分:0)
由于Phone类是C ++类,我们首先要做的是将Phone类注册为qmlRegisterType以进行QML访问。 See this for help
将此行添加到main.cpp
qmlRegisterType(" bb.system.phone",1,0," Phone");