When I set the resolution to 800x600, my application crashes with the following errors:
QXcbConnection: XCB error: 2 (BadValue), sequence: 460, resource id: 0, major code: 1 (CreateWindow), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 461, resource id: 37748745, major code: 2 (ChangeWindowAttributes), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 462, resource id: 37748745, major code: 18 (ChangeProperty), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 463, resource id: 37748745, major code: 18 (ChangeProperty), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 464, resource id: 37748745, major code: 18 (ChangeProperty), minor code: 0
etc.
But when I run a Qml application on a monitor with a resolution of 1920x1080 (or any other larger or equal to 1024x768) resolution, the application works fine.
It's seems like it is a Qt bug or an xcb library bug.
UPD: I created a bug report in bugreports.qt.io.
This effect reproduced only for Qt Quick Controls 2 Application
This effect not reproduced if delete next line of code( in main.cpp ):
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);