diff options
author | Thomas Moenicke <thomas.moenicke@nokia.com> | 2010-11-15 17:59:46 +0200 |
---|---|---|
committer | Stanislav Ionascu <stanislav.ionascu@nokia.com> | 2010-12-28 10:33:14 +0200 |
commit | 480bb57d1b414fccd87e93f33db8bf875c477147 (patch) | |
tree | e41b781cecfd6462b734d2aa735faf1137916ca9 | |
parent | a6eb407e7f42478bfd183d49a2713b10f46a2622 (diff) |
Changes: Fixes NB#201477 - Content item page in widgetsgallery: QGraphicsLayout::addChildLayoutItem: MImageWidget "CommonSubIconTop" in wrong parent; moved to correct parent
RevBy: Stanislav Ionascu
Details:
ModifiedBy: Stanislav Ionascu
Removed redundant checks for widgets and cleaned it up.
-rw-r--r-- | src/corelib/widgets/madvancedlistitem.cpp | 7 | ||||
-rw-r--r-- | src/corelib/widgets/mdetailedlistitem.cpp | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/corelib/widgets/madvancedlistitem.cpp b/src/corelib/widgets/madvancedlistitem.cpp index 14006194..30583feb 100644 --- a/src/corelib/widgets/madvancedlistitem.cpp +++ b/src/corelib/widgets/madvancedlistitem.cpp @@ -62,16 +62,21 @@ void MAdvancedListItemPrivate::createLayout() panelLayout->setSpacing(0); panel->setLayout(panelLayout); + q->sideTopImageWidget()->setParentItem(panel); + q->sideBottomImageWidget()->setParentItem(panel); + panelLayout->addItem(q->sideTopImageWidget()); panelLayout->addItem(q->sideBottomImageWidget()); layout()->addItem(panel, 0, 2, 3, 1, Qt::AlignVCenter); - layout()->addItem(new QGraphicsWidget(q), 2, 1); break; } case MAdvancedListItem::IconWithTitleProgressIndicatorAndTopSideIcon: { + q->sideTopImageWidget()->setParentItem(q); + q->sideBottomImageWidget()->setParentItem(q); + layout()->addItem(q->imageWidget(), 0, 0, 3, 1); layout()->addItem(q->titleLabelWidget(), 0, 1); layout()->addItem(q->progressIndicator(), 1, 1, 1, 2); diff --git a/src/corelib/widgets/mdetailedlistitem.cpp b/src/corelib/widgets/mdetailedlistitem.cpp index b09c1868..2ecda0f3 100644 --- a/src/corelib/widgets/mdetailedlistitem.cpp +++ b/src/corelib/widgets/mdetailedlistitem.cpp @@ -104,6 +104,9 @@ void MDetailedListItemPrivate::createLayout() panelLayout->setSpacing(0); panel->setLayout(panelLayout); + q->sideTopImageWidget()->setParentItem(panel); + q->sideBottomImageWidget()->setParentItem(panel); + panelLayout->addItem(q->sideTopImageWidget()); panelLayout->addItem(q->sideBottomImageWidget()); @@ -126,11 +129,13 @@ void MDetailedListItemPrivate::createLayout() panelLayout->setSpacing(0); panel->setLayout(panelLayout); + q->sideTopImageWidget()->setParentItem(panel); + q->sideBottomImageWidget()->setParentItem(panel); + panelLayout->addItem(q->sideTopImageWidget()); panelLayout->addItem(q->sideBottomImageWidget()); layout()->addItem(panel, 0, 2, 3, 1, Qt::AlignVCenter); - layout()->addItem(new QGraphicsWidget(q), 2, 1); break; } |