QString s = Archives_dlg->getFileName(idx);
180 C:\Qt\test\sms\menu.cpp base operand of `->' has non-pointer type `Archives'

getFileName is a public function of class Archives.

Just like another instance in the code where this time it is a public function of another class.
I cannot see any difference in the way I do it.