本文整理汇总了C++中QDeclarativeView::property方法的典型用法代码示例。如果您正苦于以下问题:C++ QDeclarativeView::property方法的具体用法?C++ QDeclarativeView::property怎么用?C++ QDeclarativeView::property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDeclarativeView
的用法示例。
在下文中一共展示了QDeclarativeView::property方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tryToDisableSystemRotation
static void tryToDisableSystemRotation(const QDeclarativeEngine *engine)
{
QDeclarativeView *declarativeView = 0;
const QWidgetList &widgets = QApplication::allWidgets();
for (int i = 0; i < widgets.count() && !declarativeView; i++) {
QDeclarativeView *tempView = qobject_cast<QDeclarativeView *>(widgets.at(i));
if (tempView && tempView->engine() == engine)
declarativeView = tempView;
}
if (!declarativeView)
return;
engine->rootContext()->setProperty("declarativeViewPtr", qVariantFromValue(qobject_cast<QObject *>(declarativeView)));
// If resize mode set from componenttest
if (declarativeView->property("orientationMethod").toBool())
return;
// Do not use sensor orientation method with simulator
#ifndef Q_WS_SIMULATOR
declarativeView->setAttribute(Qt::WA_SymbianNoSystemRotation);
#endif
}