本文整理汇总了C++中QDeclarativeItem::setHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ QDeclarativeItem::setHeight方法的具体用法?C++ QDeclarativeItem::setHeight怎么用?C++ QDeclarativeItem::setHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDeclarativeItem
的用法示例。
在下文中一共展示了QDeclarativeItem::setHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setCinamaList
void KinoafishaWidget::setCinamaList(const QList<Cinema *> cinemaList)
{
QTime progressTime;
qDebug() << "Set cinema list to qmlView...";
progressTime.start();
QSettings settings;
QString affishaQmlPatch = settings.value(SETT_KEY_KINOAFISHA_QML_PATCH,
QCoreApplication::applicationDirPath() +
DEFATUL_SETT_VALUE_KINOAFISHA_QML_PATCH).toString();
qDebug() << "Load qml " << affishaQmlPatch + "/Affisha.qml...";
QTime loadTime;
loadTime.start();
if (!QFile::exists(affishaQmlPatch + "/Affisha.qml"))
{
qWarning() << "Affisha.qml not found";
return;
}
setSource(QUrl::fromLocalFile(affishaQmlPatch + "/Affisha.qml"));
qDebug() << "Load qml finished in " << loadTime.elapsed();
QDeclarativeItem * rootItem = qobject_cast<QDeclarativeItem *>(rootObject());
qDebug() << "Kinoafisha widget width " << _screenWidth <<" height " << _screenHeight;
rootItem->setWidth(_screenWidth);
rootItem->setHeight(_screenHeight);
connect(rootObject(), SIGNAL(trailerPlayFinished(int)), this, SIGNAL(traylerPlayedFinised(int)));
foreach (Cinema *currentCinema, cinemaList)
{
addCinema(currentCinema);
}