It means the object on the left side of the arrow is a pointer to an instance of a class or structure, and the name on the right is a member of that class or structure.
In the context:
ui->setupUI(this);
it means that ui
is a pointer to an instance of the class Ui::MainWindow
and the setupUI(this)
is an invocation of the setupUI
member function of that class with the parameter this
.
When you have an actual instance of a class (or structure) instead of a pointer, then you use the notation:
Ui::MainWindow non_ptr; // not a pointer
non_ptr.setupUI(this);
Strictly, you can also write:
(*ui).setupUI(this);
However, you will rightly be ostracized if you write code like that rather than using the ->
arrow operator.