ScreenExtras QML Type
A Signleton that is used to gather information about screens and set up things like Font sizes and scale sizes More...
Import Statement: | import QmlScreenExtras 1.0 |
Properties
- desktopHeight : int
- desktopWidth : int
- formFactor : string
- numberOfScreens : int
- primaryScreenName : string
- scaleSize : double
- virtualHeight : int
- virtualWidth : int
Methods
- font(Font)
- screenNameAt(int screenNumber)
- screenRefreshRateAt(int screenNUmber)
Detailed Description
Example of using the font
Text{ font.pixelSize: ScreenExtras.font(ScreenExtras.NORMAL) }
Example of setting width or height
this would set the width of the Rectangle to 16 px if the scale size is 1
Rectangle{ width ScreenExtras.gu(2) }
Property Documentation
Returns the Screens height. This is without the Window managers padding. designHeight
See also virtualHeight.
Returns the Screens width. This is without the Window managers padding. if you would like to get the screens width minus what the window manager is taking up see designWidth
See also virtualWidth.
returns the current formfactor as a string for the device that is being used
There are 5 values
- desktop
- tv
- phablet
- tablet
- phone
Returns a number of all the screens associated with the windowing system the application is connected to.
returns what QScreen thinks the scaleSize should be set to. I would not use this.
This property holds the available width of the Screen minus what the windowmanager is taking up
This property holds the available width of the Screen minus what the windowmanager is taking up
Method Documentation
FontSize
This is used to set the font size here is a example
Text{ font.pixelSize: ScreenExtras.font(ScreenExtras.NORMAL) }
see also the types of font sizes
Returns the refresh rate of a screen at its interger,
Example: say that I have for screens attached to a machine and I want to get teh refresh rate of the screen that is the 3rd one.
ScreenExtras.screenRefreshRateAt(2)
See also numberOfScreens.