I am writing a program UI in Qt on Linux that runs on an 800x600 resolution display showing a 720x576 video stream from another input. I want to be able to display this video stream on the 800x600 display allowing a horizontal space of 80 pixels for functioning buttons and 24 pixels vertically for a status bar to inform about current battery, other video info etc.
The problem is that I size my MainWindow to encompass the entire 800x600 and within this I have multiple respective horizontal and vertical layouts for the rest of my widgets etc and a space for where the video will stream, but the height of my 'status bar' (not using the QtStatusBar class, just a vert. layout box) is nowhere near the 24 pixels that it should be although my video space is at the correct 720x576 and MainWindow at 800x600.
I have set things to scale when the window is resized and I noticed that only when MainWindow is at 818x618 do the mathematics of the pixels of the other layouts/widgets within the MainWindow reconcile (video space becomes 720x576, bar is 24 pixels in height and side bar 80 pixels in width as required).
When this is scaled down, the size of the video space does not remain correct, it changes to something like 706x563; so as to amend this, I changed the ratio of space acquirements of the layouts within the main layout to revert the video space dimensions back to the wanted 720x576. This then results in a status bar resize of around 10 pixels in height rather than the required, and should-be, 24 pixels. I have removed all the layout spacings so have removed this factor from the mysteriously disappearing pixels and I am unsure what else could be causing this.
This is mostly a Qt Designer problem and there is not much coding involved so I will not be providing any code for analysis.
What is causing this sizing issue for dimensions to not add up?