____________________________________________________________________________
______
David Pine
New York University
Silver Professor
Chair, Department of Chemical & Biomolecular Engineering
NYU Tandon School of Engineering
Professor of Physics
NYU College of Arts & Science
Office (Brooklyn):158 Jacobs Administration Building [6 MetroTech Center,
Brooklyn, New York 11201]
Office (Manhattan): Room 883 [726 Broadway, New York, NY 10003]
Tel: 646-997-3004 (Brooklyn)
Tel: 212-998-7744 (Manhattan)
Web: http://www.physics.nyu.edu/pine/Home.html
E-mail: pine@nyu.edu
The FigureCanvas sets a (non-binding) sizeHint; the FigureManager takes the hint + the toolbar size and sets the window to the correct size. I think if you want to use the canvas directly, you'll need to read the size and set it as a hard requirement, or maybe set the QSizePolicy to require the hinted size.
Activity
tacaswell commented on Jun 5, 2017
😞 I thought we had this sorted out.
There is a bunch of jiggery-pokery to double the DPI under the hood. Does it help if you set the figure size after your create and add the canvas?
attn @efiring
djpine commented on Jun 5, 2017
QuLogic commented on Jun 5, 2017
The FigureCanvas sets a (non-binding) sizeHint; the FigureManager takes the hint + the toolbar size and sets the window to the correct size. I think if you want to use the canvas directly, you'll need to read the size and set it as a hard requirement, or maybe set the QSizePolicy to require the hinted size.
FIX: Qt5 account for dpiratio as early as possible