Newbie to C, C++ and QT.
I understand the usage of "&" for retreiving the address location pointed to by a pointer, but I am going through some C++ examples and I see the following:
int rowCount(const QModelIndex &parent = QModelIndex()) const ;
bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
Is the usage of the "&" in "&parent" and " & index" mean "pass-by-reference"?
If so then why is the "&" right before "parent" and there is a space in before "index"?
Also are these the same as writng it as "QModelIndex& parent"?
Thanks for your help. The syntax can be rather confusing.