That's the way to do it.
Member variables exist for the purpose of having access to data from all methods of an object.
Why? This is how object oriented language are designed to work.
ui is a pointer to an object of a generated class.
You can of course derive from that class, add your additional members to that and then create an instance of it.
Or you use a second container object of a custom class.
Cheers,
_
Bookmarks