我有一个关于 Qt 5.5.1 的项目,一切都很好,但今天我将 Qt 升级到 5.7,然后我在运行时遇到以下错误,它不会使应用程序崩溃,但它让我发疯,因为它以前不存在
DirectWrite: CreateFontFaceFromHDC() 失败(表示输入文件(例如字体文件)中出现错误。)对于 QFontDef(Family="Small Fonts", pointsize=15, Pixelsize=20, styleHint=5, Weight=50,stretch=100 ,hintingPreference=0) LOGFONT("小字体", lfWidth=0, lfHeight=-20) dpi=96 DirectWrite: CreateFontFaceFromHDC() 失败(表示输入文件(例如字体文件)中出现错误。) for QFontDef(Family= “系统”,pointsize = 15,pixelsize = 20,styleHint = 5,weight = 50,stretch = 100,hintingPreference = 0)LOGFONT(“System”,lfWidth = 0,lfHeight = -20)dpi = 96如何修复它
我在Qt C++的应用程序中有这个代码.我operator==比较结构总是返回false,即使它们相等.我的代码出了什么问题?
这是一个有问题的代码片段:
struct pSettings
{
int speciality;
bool autoCompleteByWord;
bool showChronicConditions;
bool showNavArrows;
bool smallScreenMode;
bool simpleExamination;
bool alwaysSave;
bool inLinePatientList;
double newVisitPrice;
double followVisitprice1;
double followVisitprice2;
double followVisitprice3;
double followVisitprice4;
int autosaveinterval;
bool autoSave ;
bool minimizeToTray;
int selectedTheme;
QString textColor;
QString topBGColor;
QString bottomBGColor;
QString altWinColor;
QString buttonColor;
QString altButtonColor;
QString textBGColor;
QString borderColor1;
QString borderColor2;
QString altButtonColorHover;
QString buttonColorHover;
QString buttonColorDisabled;
QString buttonBorderColorHover;
QString comboBGcolor;
QString buttonTextColor;
QString comboTextColor;
double lOffSet,tOffSet;
QString defaultFont;
double …Run Code Online (Sandbox Code Playgroud)