Floating dock widget problem still exists in Qt 5.0.1 I found a workaround. After state restore do this:
Qt Code:
  1. if(yourDockWidget->isFloating())
  2. {
  3. yourDockWidget->setFloating(true);
  4. }
To copy to clipboard, switch view to plain text mode 
And widget becomes dock able again.