简体   繁体   中英

How to detect screen resolution in qt?

I set resolution of frame buffer in Intel platform using ioctl methods of Linux kernel. I able to set this resolution successfully (verify with again get this parameters) but didn't get in qt. When I check desktop geometry it was get which I set on boot (1920*1024) and also not getting resizeevent(). Can somebody say where am lacking .... ?

Try this:

QDesktopWidget widget;
QRect mainScreenSize = widget.availableGeometry(widget.primaryScreen());

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM