This problem occurs with a subclassed KXmlGuiWindow which has a QDockWidget displayed on either it's left or right sides. The central widget is a QTreeView, not that it matters.
The application autosaves the window positions and sizes. The following behavious only occurs when the application is closed with the dock window displayed and it was maximized:

When the application restarts, it tries to resize to the fullscreen size, in my case 1650x1080. But in the applications rc file, the main window sizes are reported to be:

Qt Code:
  1. [MainWindow]
  2. Height 1050=1051
  3. Width 1680=1681
To copy to clipboard, switch view to plain text mode 

As you can see, the sizes are off by one pixel. The causes the application to very breifly resize to fullscreen+1, and then it resizes to a very small (default) size. The problem is obviously alleviated somewhat by specifying a suitably large default size, but what one really wants is the application to resize properly. Does anyone know a solution for this problem? As I have specified, it is only caused when the dock widget is displayed: hiding the dock widget causes the application to resize normally upon restart. I have not specifically saved the dock widgets size on shutdown: since it is a child widget of the main window all of it's attributes are saved automatically.