[Development] QProperty and library coding guide

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Fri Jul 17 13:54:08 CEST 2020


Il 16/07/20 17:40, Volker Hilsheimer ha scritto:
> The struct has no data itself, so ideally would be of size zero.

I'm missing some piece of the puzzle: if you take action->text, and text 
is a zero-size struct, how does the operator() applied to it figure out 
which action needs to read the text property from? E.g. like so:

> QAction *action = ~~~;
> auto prop = action->text;
> QString text = prop();

Thanks,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200717/056a718b/attachment-0001.bin>


More information about the Development mailing list