diff options
Diffstat (limited to 'src/widgets/kernel')
| -rw-r--r-- | src/widgets/kernel/qformlayout.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/kernel/qwidget.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp index c66a6d56736..868ac17b6fb 100644 --- a/src/widgets/kernel/qformlayout.cpp +++ b/src/widgets/kernel/qformlayout.cpp @@ -1907,7 +1907,7 @@ void QFormLayout::getItemPosition(int index, int *rowPtr, ItemRole *rolePtr) con if (rowPtr) *rowPtr = row; - if (rolePtr && col != -1) { + if (rolePtr && row != -1) { const bool spanning = col == 1 && d->m_matrix(row, col)->fullRow; if (spanning) { *rolePtr = SpanningRole; diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 370ae2aed15..b465ac36c7e 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5611,13 +5611,15 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP // punch a hole in the backingstore, so the texture will be visible. if (!q->testAttribute(Qt::WA_AlwaysStackOnTop)) { beginBackingStorePainting(); - QPainter p(q); if (backingStore) { + QPainter p(q); p.setCompositionMode(QPainter::CompositionMode_Source); p.fillRect(q->rect(), Qt::transparent); } else { + QImage img = grabFramebuffer(); + QPainter p(q); // We are not drawing to a backingstore: fall back to QImage - p.drawImage(q->rect(), grabFramebuffer()); + p.drawImage(q->rect(), img); skipPaintEvent = true; } endBackingStorePainting(); |
