[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: KGuiAddons and QGestures like tap/click-and-hold to open context menu?
From: David Faure <faure () kde ! org>
Date: 2017-03-15 8:39:01
Message-ID: 12525108.G7M4Mxs35W () asterixp50
[Download RAW message or body]
On mercredi 15 mars 2017 09:27:28 CET René J.V. Bertin wrote:
> On Wednesday March 15 2017 09:07:48 David Faure wrote:
> >Definitely. But there's another solution: QObject::setProperty,
> >which supports dynamic properties so you can store anything you want in
> >there.
> I did think of something like that, but didn't get around yet to figuring
> out how.
>
> Any idea how much overhead that method comes with? A priori I'd just need
> to store a boolean.
Go for it, it's just one more QVariant.
> Talking about overhead, what would be cheaper, storing the result of a
> dynamic_cast in a temp. variable or calling obj->inherits()? (I could peek
> at the sources and run benchmarks but I'm not convinced it'd be worth the
> time.)
Neither, use qobject_cast.
--
David Faure, faure@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic