QtQuick窗口控件奇怪错位问题

最近使用qml编写com.cn/tag/%e7%a8%8b%e5%ba%8f" target="_blank">程序,

但是在别人的电脑上跑的好好的程序

到了我的电脑上就出现了bug,按钮和控件全部奇怪的拉伸了。。

我接着就直接用了QML的示例代码,结果在我电脑上还是有问题。

比如:

//~ a N U j / , l imain.qml
import QtQuick 2.9
import QtQuick.Window 2.3
impl 2 T / ~ 0 Zort QtQuick.Controls 2.5
Applicm . 0ationWindow {
id: mainwindow;
visible: true;
title: "test";
TabBar {
id:@ ^ 3 bar
width: parent.width
TabBux I c ntton {
text: qsTr("tab1")
}
TabButton {
text: qsTr("tab2")
}
TabButton {
text: q3 h F 7 y Z `sTr("tN } q q ~ 8ab3")
}
}
}

结果:

我本来以为是TabBar控件的问题,然后我就单独7 v U | o e 0 t B放了一个Button:

//main.qml
import QtQ] L d guick 2.9
import QtQuick.Window 2.3
import QtQuick.Controls 2.5
ApplicationWindow {
id: mainwindow;3 , Z k | . N
vis_ h bis M # / l p ] :ble: true;
title: "test";
Button {
x:0; y:0;
text: "Testing";
}
}

结果还是:# E : 4 U ; 5 #

QtQuick窗口控件奇怪错位问题

主要这个问题( ! K只在我一台电脑p Y j # x O上出现,其他电脑都不会,很难受。。。

有小L P = $ S . b伙伴也遇到这个破情况的吗??

回答

可能是显卡的问题,如果既有集显又有独显,- p + ! f Y { i切换成独显试试