Access to ListBox

Hi there,

what is the easiest and quickest way to access the listbox from inside the listboxmodel class
that is currently attached to that listbox, if there is a way?

Would like to extend the listboxmodel class with some methods where I need to access the


In general it’s probably a bad thing for your model to need to reference the listbox component, but if you really need to, just give it a pointer to its listbox when you create it.

Referencing to the listbox is exactly the way I do it right now but since you can attach
different models to a listbox, its not a proper and clean solution to reference to a listbox.

No other way like model->getCurrentlyAttachedListBox()???

Exactly my point, and that’s why I don’t provide a method to do so!

Okay, got you.