Skip to main content

Posts

Showing posts from September, 2017

Dealing with DPI in Qt

Qt is an awesome framework for building responsive desktop applications. Before releasing an application though, you will need to deal with issues involving DPI. Depending on your target OS there are a few options and issues to consider. Qt gives some helpful information  here . On Windows you need to understand that there are 3 levels of dpi-awareness your application can have. By default a Qt application declares itself dpi-aware , either per-screen-awareness for Windows 8.1+, or system-wide-awareness for older Windows versions. This means that you will need to do some work to make your application adjust appropriately. The Easy Way If you are targeting Windows only , then there is an easy solution to make a dpi-unaware application look good on all displays. Simply tell windows that your application is dpi-unaware and Windows will scale the application window so it looks normal on high-dpi displays that have fonts scaled. Just add a qt.conf file to your applicatio...