Does QWidget::width() always return width in number of pixels?
-
Hi,
I'm a little confused.
I have a monitor set to a resolution of 3840 x 2160.
When a have a full screen Qt window with a QWIdget such that the widget has maximum width (almost the entire screen), the width() function of this widget still returns only about 2530. While I expected a value close to 3840. How is that possible? -
Hi,
Any chances you have a scaling factor of 1.5 set for that screen ?
-
@Simmania said in Does QWidget::width() always return width in number of pixels?:
No,
I didn;t set anything.
When I add:
painter.scale(1.0, 1.0);I think what @SGaist was asking was: is a scaling factor set in your OS for that screen?
-
@Simmania said in Does QWidget::width() always return width in number of pixels?:
So that means you never can be sure the width() is expressed in pixels
How should the OS add this scale factor otherwise?