Closed nsmela closed 10 months ago
The resize event has to be raised from PyQtitself. See for instance https://github.com/tpaviot/pythonocc-core/blob/master/src/Display/SimpleGui.py#L213 where I have to set the window size twice to get sure the occ widget fit the parent window.
So far, I did not find any better solution
Thanks! I think you linked to a function to centre the window. Did you mean https://github.com/tpaviot/pythonocc-core/blob/master/src/Display/SimpleGui.py#L234?
Given the example there, I created a function for my window:
def showProperly(self):
size = [self.size().width(), self.size().height()]
self.resize(size[0]-1, size[1]-1)
self.show()
self.resize(size[0], size[1])
I couldn't call the window.show() function the same way since I'm using a splash screen, so I use this function instead of calling window.show() in the main file.
Hi there,
I'm having a hard time getting the display in PyQt5 to fully fit into a window. If I resize the window, it then works great.
I've tried:
Any other suggestions?