It turns out that one may disable all features of a QDockWidget by doing
clockDock->setFeatures(QDockWidget::NoDockWidgetFeatures); or set only desired features by doing clockDock->setFeatures(QDockWidget::DockWidgetMovable |
QDockWidget::DockWidgetFloatable); //DockWidgetClosable

and the reason the digital clock was not displaying hh:mm:ss when the example app displayed hh:mm without a problem is because the QLCDNumber class only displays 5 "digits" by default. In this case each "digit" correlates to the number of characters returned by
QString text = time.toString("hh:mm:ss");
There are 8 characters in text variable, so I increased the DigitCount attribute from 5 to 8 by doing
setDigitCount(8);
and the whole time format gets displayed properly.