Qt-interest Archive, May 2008
FYI: font problems with Qt 3.3 and MSVC9
Message 1 in thread
Hi,
I tried to compile Qt 3.3.6 with MSVC9. The compilation worked fine,
but menus had a very large font for me. A customer reported that he
the fonts were way too small for him. I looked a bit closer at the
problem and found a patch:
--- qapplication_win.cpp.orig 2008-05-22 12:59:44.000000000 +0200
+++ qapplication_win.cpp 2008-05-22 13:00:15.000000000 +0200
@@ -548,7 +548,7 @@
QT_WA( {
NONCLIENTMETRICS ncm;
- ncm.cbSize = sizeof( ncm );
+ ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICS, lfMessageFont) + sizeof(LOGFONTW);
SystemParametersInfo( SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0 );
menuFont = qt_LOGFONTtoQFont(ncm.lfMenuFont,TRUE);
messageFont = qt_LOGFONTtoQFont(ncm.lfMessageFont,TRUE);
@@ -558,7 +558,7 @@
} , {
// A version
NONCLIENTMETRICSA ncm;
- ncm.cbSize = sizeof( ncm );
+ ncm.cbSize = FIELD_OFFSET(NONCLIENTMETRICSA, lfMessageFont) +
sizeof(LOGFONTA);
SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
menuFont = qt_LOGFONTtoQFont((LOGFONT&)ncm.lfMenuFont,TRUE);
messageFont = qt_LOGFONTtoQFont((LOGFONT&)ncm.lfMessageFont,TRUE);
Just in case somebody else runs into this problem (AFAIK, Trolltech no
longer supports the Qt 3.3 line; but there are certainly people out
there still using Qt 3.3).
Rainer
--
[ signature omitted ]