
:max_bytes(150000):strip_icc()/001-use-your-ipad-as-second-monitor-1994716-8711d72a1a40414c8610548b23e21a3a.jpg)

WindowUi_->pagerStackedWidget->findChildren() ) Resize the layouts within the stacked widget This->setFixedSize( (int)(scale * this->maximumWidth()), Enlarge the window and various child widgets to accomendate MainWindow::MainWindow( QWidget *parent ) Here's how I got the dpi scale (in a file called "WindowsDpiScale.h"): #ifndef WINDOWSDPISCALE_HįLOAT dpiX = static_cast( GetDeviceCaps( screen, LOGPIXELSX ) ) Īnd then, how I applied it in my case. I fixed this by retreiving the os scaling factor and then adjusted the size of the my window and some of it's layouts (which I couldn't get to scale automatically for some reason). I had a fixed size window which was not large enough to fit all the text it contained when Windows accessibility settings where applied to scale up all text sizes. You could manually specify the font, too. QApplication has some settings that are somewhat related. If you are using QML, try for pristine layouts of only anchor based placement. You could try checking with other built in measurements from Qt: Telling the OS that you handle DPI changes, will prevent weird font changes that you weren't expecting.įor spacing critical places, you can check the size of your rendered font, and then set the minimum size of your object based on the resulting size of your text.
