summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRainer Keller <Rainer.Keller@qt.io>2017-09-19 08:47:03 +0200
committerRainer Keller <Rainer.Keller@qt.io>2017-09-25 12:56:04 +0000
commitbde42ffb8b3de541b0ced5b5f46eac6dc441dda7 (patch)
tree7f5f51640d00d32554caee0d24f496734a7e051d /src
parent292cb12e024e63f17c501611e021b6f8da7d6dcc (diff)
Avoid window geometry jittering when changing geometry from JavaScript
The QML API allowed only separate setting of geometry parameters which causes flickering when all parameters need to be changed. By exposing the setGeometry function it is possible to set all of these at once using an imperative setGeometry call from JavaScript. Note that bindings for x/y/width/height are still evaluated sequentially, resulting in four calls to the platform window's setGeometry. This patch only introduces an imperative workaround for that issue. Change-Id: Ie9b0d3c39434740e50757ba7cff0385ae80f47f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwindow.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 4a874caacb..44ff054fa3 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -218,8 +218,6 @@ public:
void setBaseSize(const QSize &size);
void setSizeIncrement(const QSize &size);
- void setGeometry(int posx, int posy, int w, int h);
- void setGeometry(const QRect &rect);
QRect geometry() const;
QMargins frameMargins() const;
@@ -300,6 +298,8 @@ public Q_SLOTS:
void setY(int arg);
void setWidth(int arg);
void setHeight(int arg);
+ void setGeometry(int posx, int posy, int w, int h);
+ void setGeometry(const QRect &rect);
void setMinimumWidth(int w);
void setMinimumHeight(int h);