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

Robert Hairgrove evorgriahr at hispeed.ch
Tue Feb 8 20:38:43 CET 2011


On Tue, 2011-02-08 at 19:00 +0100, Niels Dekker (Qt-interest) wrote:
> Well, conceptually one might consider retranslation of the Ui a non-const 
> operation.

Conceptually, I would consider any operation which changed anything on
the UI to be a non-const operation...

> Anyway, I wouldn't mind if a function like createAndSetupUi would return a 
> non-const reference. Leaving it up to the user whether the ui member 
> variable is a const, or a non-const reference.

But I thought that the whole motivation for this project was to provide
a const UI object? We already have the non-const version...besides, I
have yet to see the real benefit of having the UI member const. Who
should change it? Either it is a private subclass or a private member
variable (pointer or not).




More information about the Qt-interest-old mailing list