[Development] Pattern for native properties on Qt Window System abstractions

Olivier Goffart olivier at woboq.com
Thu Mar 27 19:46:04 CET 2014


On Wednesday 26 March 2014 14:53:40 Jorgen Lind wrote:
> Hi,
> 
> I have a patch which is going nowhere:
> https://codereview.qt-project.org/#change,75845
> 
> The problem with the patch is that it solves something which is allready
> doable today with dynamic properties and dynamic property change event.
> 
> The purpose of this patch is that a platform plugin can define a header
> containing enums which will work as a contract for native properties and
> flags which the platformplugin will handle. The application/library can
> then in a typesafe way set these properties on the window.
> 
> I'm ok with dropping the patch it that is the consensus, but as its now, its
> just laying around not getting any thumbs up or down.


Personally, I am not convinced this provides anything more than qobject's 
dynamic property.

For compile time checking of the properties,  you could use 
static const char MyPropName[] = "FooBar_MyPropName";


For the signal, you currently would need to add a even filter to filter on the 
dynamic property change event.   
Perhaps it would be a good idea to add a signal for that in QObject actually. 

That's just my opinion.

-- 
Olivier 

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org



More information about the Development mailing list