Following the answer here, I set the preferredContentSize of the QLPreviewingController.
This changes the window size as intended, but also seems to break subsequent auto resizing of all subviews. After setting it, the content will no longer track the preview window size when the user resizes it manually or enters fullscreen.
Any attempts to set view sizes, resizing masks or constraints programmatically after setting the preferredContentSize property will cause errors like
and have no visible effect. Setting the breakpoint only tells me that the error is caused by trying to change the size of a view.
This changes the window size as intended, but also seems to break subsequent auto resizing of all subviews. After setting it, the content will no longer track the preview window size when the user resizes it manually or enters fullscreen.
Any attempts to set view sizes, resizing masks or constraints programmatically after setting the preferredContentSize property will cause errors like
Code Block NSServiceViewControllerWindow ... attempted to set frame of... from {...} to {...} and got {...}; set breakpoint on -[NSViewServiceMarshal actualFrame:differsFromSpecifiedFrame:oldFrame:ofWindow:] to catch this
and have no visible effect. Setting the breakpoint only tells me that the error is caused by trying to change the size of a view.