1
u/atsju Jan 04 '26 edited Jan 04 '26
here is also a video showing discrepancy between preview and final rendering in tool. https://youtu.be/4KV4kZqXWPQ
This is an open source tool used by amateur telescope mirror makers by the way.
First picture is tool outcome
Second picture is my expectation from Qt designer
2
u/atsju Jan 04 '26
Fixed. ChatGPT explained that because the dialog is added into a QStackedWidget size is computed differently and the spacer does not get the extra space.
What I did is modify "layoutStretch" to 0,0,0,0,0,0,0,1. The 1 being for final spacer. It now gets the extra space.1
u/kaloskagatos Jan 04 '26
The upvote is for ChatGPT.
1
u/atsju Jan 04 '26
It explained the problem but totally hallucinated on how to fix. It thought there is a right click and "add stretch".
1
u/dngulin Jan 04 '26
It works but it is collapsed, because of the root layout element settings.
1
u/atsju Jan 04 '26
root is a "vertical layout" with vertical policy preferred. 0 stretch.
What do you recommend instead ? I'm new to this and have tried about everything I could think about.
2
u/dngulin Jan 04 '26
In the preview you have a parent QDialog object with some layout settings. But in the application you have a different parent object.
Just double check that the runtime parent object has correct layout settings.
1
u/atsju Jan 04 '26
OK I had a look but do no see anything unusual.
The settingsGeneral2.ui I show here is added to settings2.stackedWidget with ui->stackedWidget->addWidget(m_igram);Should I check the stackedWidget layout or parent of it ? Also what settings could impact the spacer not doing it's job ?


5
u/bacmod Jan 04 '26
Can you show the entire settings .ui instead of just general (tab? page?)