summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/doc/images/graphicsflowlayout.pngbin0 -> 6064 bytes
-rw-r--r--src/widgets/itemviews/qheaderview.cpp18
-rw-r--r--src/widgets/itemviews/qheaderview.h3
-rw-r--r--src/widgets/kernel/qapplication.cpp4
-rw-r--r--src/widgets/kernel/qwidget.cpp4
5 files changed, 15 insertions, 14 deletions
diff --git a/src/widgets/doc/images/graphicsflowlayout.png b/src/widgets/doc/images/graphicsflowlayout.png
new file mode 100644
index 0000000000..ea70e102c3
--- /dev/null
+++ b/src/widgets/doc/images/graphicsflowlayout.png
Binary files differ
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index b7048d1616..00e9ff7400 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -1175,9 +1175,10 @@ bool QHeaderView::sectionsMovable() const
*/
/*!
- \since 5.10
+ \property QHeaderView::firstSectionMovable
+ \brief Whether the first column can be moved by the user
- If \a movable is true, the first column can be moved by the user.
+ This property controls whether the first column can be moved by the user.
In a QTreeView, the first column holds the tree structure and is
therefore non-movable by default, even after setSectionsMovable(true).
@@ -1186,8 +1187,11 @@ bool QHeaderView::sectionsMovable() const
In such a scenario, it is recommended to call QTreeView::setRootIsDecorated(false)
as well.
- This method has no effect unless setSectionsMovable(true) is called as well.
+ Setting it to true has no effect unless setSectionsMovable(true) is called
+ as well.
+
\sa setSectionsMovable()
+ \since 5.11
*/
void QHeaderView::setFirstSectionMovable(bool movable)
{
@@ -1195,13 +1199,7 @@ void QHeaderView::setFirstSectionMovable(bool movable)
d->allowUserMoveOfSection0 = movable;
}
-/*!
- \since 5.10
-
- Returns \c true if the first column can be moved by the user,
- when this header is used in a QTreeView.
-*/
-bool QHeaderView::firstSectionMovable() const
+bool QHeaderView::isFirstSectionMovable() const
{
Q_D(const QHeaderView);
return d->allowUserMoveOfSection0;
diff --git a/src/widgets/itemviews/qheaderview.h b/src/widgets/itemviews/qheaderview.h
index c09081cd80..7e950add1f 100644
--- a/src/widgets/itemviews/qheaderview.h
+++ b/src/widgets/itemviews/qheaderview.h
@@ -53,6 +53,7 @@ class QStyleOptionHeader;
class Q_WIDGETS_EXPORT QHeaderView : public QAbstractItemView
{
Q_OBJECT
+ Q_PROPERTY(bool firstSectionMovable READ isFirstSectionMovable WRITE setFirstSectionMovable)
Q_PROPERTY(bool showSortIndicator READ isSortIndicatorShown WRITE setSortIndicatorShown)
Q_PROPERTY(bool highlightSections READ highlightSections WRITE setHighlightSections)
Q_PROPERTY(bool stretchLastSection READ stretchLastSection WRITE setStretchLastSection)
@@ -119,7 +120,7 @@ public:
inline QT_DEPRECATED bool isMovable() const { return sectionsMovable(); }
#endif
void setFirstSectionMovable(bool movable);
- bool firstSectionMovable() const;
+ bool isFirstSectionMovable() const;
void setSectionsClickable(bool clickable);
bool sectionsClickable() const;
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 4cf52f994a..39540cf898 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -113,8 +113,10 @@
static void initResources()
{
Q_INIT_RESOURCE(qstyle);
- Q_INIT_RESOURCE(qmessagebox);
+#if QT_CONFIG(messagebox)
+ Q_INIT_RESOURCE(qmessagebox);
+#endif
}
QT_BEGIN_NAMESPACE
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 138733476f..923245c53c 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5457,11 +5457,11 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
setSystemClip(pdev->paintEngine(), pdev->devicePixelRatioF(), rgn.translated(offset));
QPainter p(pdev);
p.translate(offset);
- context.painter = context.sharedPainter = &p;
+ context.painter = &p;
graphicsEffect->draw(&p);
setSystemClip(pdev->paintEngine(), 1, QRegion());
} else {
- context.painter = context.sharedPainter = sharedPainter;
+ context.painter = sharedPainter;
if (sharedPainter->worldTransform() != sourced->lastEffectTransform) {
sourced->invalidateCache();
sourced->lastEffectTransform = sharedPainter->worldTransform();