Noted. Would have been my next question.
Looks like the tweak_book version is a bit of a dance to get tweak's tprefs passed to calibre's prefs?
For the record, the SizePersistedDialog class I was using was basically the same thing as calibre.gui2.widgets2.Dialog.