diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-09-06 12:48:55 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-12-11 12:09:57 +0000 |
commit | 458eb65f730178bc93ba7b18f0e4dd2a13efad2e (patch) | |
tree | 3f61c4a1f28383365144d401b48f9fc4527bb311 /configure.json | |
parent | bd617ed62ba35ee11da75b7e92db3fd190751b0f (diff) |
Buttons: defer the execution of the delegates
In practice, deferring the execution of the delegates (until
accessed) means that the default delegate item does not get created
at all, when a custom control replaces it at construction time.
Button {
background: Rectangle { ... }
}
Before, such custom Button would never be faster than the original
one, because the default delegate was first created and then thrown
away at construction time. Originally, this was not considered a huge
problem, because the plan was to keep the default delegates so light-
weight that it wouldn't matter. However, then came the fancy styles
with shadows and effects and thus, heavier default delegates. There's
also a growing demand for more features, and the default delegates
are slowly getting heavier...
Now, after this patch, if you replace a heavy default delegate with
a light and simple custom delegate, the result is a much faster
control. For example, replacing Material style Button's background,
which has a shadow effect, with a plain Rectangle gives a ~10x boost,
because the default background with its heavy shadow effect is not
executed at all.
At the same time, deferring the execution of the default delegates
avoids troubles with asynchronous incubation, because we don't need
to destroy an object in the middle of the incubation process.
Task-number: QTBUG-50992
Change-Id: I2274bff99b9ff126d3748278d58d859222910c98
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'configure.json')
0 files changed, 0 insertions, 0 deletions