当前位置: 首页 > 工具软件 > GoQt > 使用案例 >

(qt以及goqt)高分屏适配,自适应dpi

吴丁雷
2023-12-01

qt

QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

QQuickView *view = new QQuickView;
view->setResizeMode(QQuickView::SizeRootObjectToView);

therecipe/qt

core.QCoreApplication_SetAttribute(core.Qt__AA_EnableHighDpiScaling, true)
    
view := quick.NewQQuickView(nil)

view.SetResizeMode(quick.QQuickView__SizeRootObjectToView)
 类似资料: