[Qt-interest] Multiple Objects all having the Same name
Andreas Pakulat
apaku at gmx.de
Wed Feb 15 08:37:01 CET 2012
On 15.02.12 07:33:22, Bo Thorsen wrote:
> Den 14-02-2012 21:30, Michael Jackson skrev:
> > Is it a "Bad Idea" to have multiple objects all have the same Object
> > Name? I am writing some code and trying to solve a problem where the
> > easiest solution would be to have some of my GUI widgets all have the
> > same Object Name. But I am thinking this is a "really bad" idea.
>
> It is probably a bad idea, because
[...]
> - Tools like Squish won't work
Thats wrong at least for Squish. While Squish does use the objectName
for identification purposes its not the only property of an object it
uses and hence its not necessarily going to fail in the case of two
objects having the same name. There are cases of course where the wrong
object could be found if not only the object name but also all other
properties and all containers are the same (i.e. the two widgets are in
the same container widget and have the same properties - including the
type).
Andreas
More information about the Qt-interest-old
mailing list