Look, your problem is that you don't understand C++, and basics of the signal slot machanism and syntax.
When you give a slot in the connect() function, you have to specify the types the slot is taking, you however are CALLING the QDir::cdUp() method.
In addition, cdUp() returns a bool, and your slot expects a QModeIndex.