For restoreState and saveState to work properly, we need to ensure that the objectname of each saved object is unique.
Ensure that the objectname of both the dock widgets are different.
eg. dock->setObjectName("Customers");
and the second one can be
dock->setObjectName("Paragraphs");
Hope it helps.
Bookmarks