[Qt-interest] A new (?) const-correct way to create aUiobjectand do setupUi

Thiago Macieira thiago at kde.org
Tue Feb 8 18:35:08 CET 2011


Em terça-feira, 8 de fevereiro de 2011, às 18:19:07, Robert Hairgrove 
escreveu:
> Once again, regarding const and non-const:
> 
> Even if I could call non-const functions on the pointer members of the
> const ui object, as Thiago has pointed out (no pun intended!), I
> wouldn't be able to call retranslateUi() on the object after creation
> which would mean that if my application allows the user to switch
> languages dynamically, it wouldn't work unless that function were
> declared const.
> 
> That's a limitation I wouldn't want to live with.

That actually means retranslateUi should be a const function.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110208/fea80f26/attachment.bin 


More information about the Qt-interest-old mailing list