本文整理汇总了Python中PySide.QtDeclarative.QDeclarativeView.errors方法的典型用法代码示例。如果您正苦于以下问题:Python QDeclarativeView.errors方法的具体用法?Python QDeclarativeView.errors怎么用?Python QDeclarativeView.errors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtDeclarative.QDeclarativeView
的用法示例。
在下文中一共展示了QDeclarativeView.errors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: QmlGui
# 需要导入模块: from PySide.QtDeclarative import QDeclarativeView [as 别名]
# 或者: from PySide.QtDeclarative.QDeclarativeView import errors [as 别名]
class QmlGui(Gui):
USES = ['geonames', 'qmllocationprovider']
def __init__(self, core, dataroot, parent=None):
self.app = QApplication(sys.argv)
self.core = core
self.view = QDeclarativeView()
self.view.statusChanged.connect(self._status_changed)
glw = QGLWidget()
self.view.setViewport(glw)
self.controller = Controller(self.view, self.core)
self.settings = SettingsWrapper(self.core)
rc = self.view.rootContext()
rc.setContextProperty('controller', self.controller)
rc.setContextProperty('settings', self.settings)
rc.setContextProperty('gps', GPSDataWrapper(self.core))
self.view.setSource(os.path.join('qml','main.qml'))
def get_gps(self, callback):
self.controller.callback_gps = callback
def show(self):
self.view.showFullScreen()
self.app.exec_()
self.core.on_destroy()
def _status_changed(self, error):
logger.error(self.view.errors())