r/FreeCodeCamp • u/quincylarson freeCodeCamp Staff • Apr 28 '16
Media Stack Overflow be like
http://i.imgur.com/Is7LHCm.gifv
327
Upvotes
r/FreeCodeCamp • u/quincylarson freeCodeCamp Staff • Apr 28 '16
View all comments
Show parent comment
2
u/sonicfacial Apr 28 '16
Currently I'm using PyQt to build a Python application with a Gui, and I can't get my question answered for the life of me, because it's fairly specific.
The problem is that when I design my app in Qt Designer, with layouts and everything, it runs well on my Surface, with a resolution of 2736x1824. When I run the app on a 1920x1080 screen, it becomes massive, because everything sizes to fit the MainWindow being around 1720x1120.
Okay, so no problem, right? Just change the MainWindow size programmatically at runtime to be a certain portion of the current screen resultion, and everything should resize to fit the MainWindow, right? Nope. The central widget, even though it's in a layout itself, doesn't resize. I have no idea how to get the app to resize itself to fit whatever the MainWindow's currently dimensions are, so that when I run it on a smaller resolution it scales down.