A QMainWindow has the docking infrastructure, a QFrame does not.
So, no you can't use a QDockWidget in the same way in a QFrame as you do in a QMainWindow.

Why do you want dock widgets in a frame?