Is there a way to use any C++ function as a Qt slot, without having its class inheriting from QWidget?
Unlikely. The Qt-meta-object-compiler (moc) wraps the function, are marked as slot-s, in relatively large code-wrapper. Files, created by moc, begin with moc_, look them.