On 2009-01-21 15:43:49 +0100, Martin Dyde <[email protected]> said:
> I have another Qt 4.5/Cocoa oddity to report:
>
> If you adjust the font properties (e.g. bold, italic) of a widget but
> leave its font family unchanged (i.e. at the system default, which is
> 'Lucida Grande'), then it does nothing on Qt 4.5/Cocoa/OS X SDK 10.5,
> but works properly on Qt 4.4/Carbon/OS X SDK 10.4u.
>
> The strange thing is that it works properly if you set a widget's font
> family to certain values (e.g. Arial, Verdana or Times New Roman) but
> not if it's left at the default of Lucida Grande (or even if I
> explicitly use QFont::setFamily("Lucida Grande") ).
>
> I.e. widget font properties are working with some fonts but not others
> (and most notably not with OS X's default widget font).
>
> I haven't actually tried rebuilding Qt 4.4/Carbon with OS X SDK 10.5,
> so I'm not absolutely sure whether the issue is in Qt 4.5/Cocoa
> specifically, or whether it's an issue in OS X SDK 10.5 itself.
>
> A workaround is always to set all widget font families to Arial or
> similar, but that looks a bit shoddy and non-native.
>
> To reproduce, edit $QTDIR/examples/widgets/charactermap/mainwindow.cpp,
> find the MainWindow::MainWindow() ctor and add the following three
> lines:
>
> MainWindow::MainWindow()
> {
> QWidget *centralWidget = new QWidget;
>
> QLabel *fontLabel = new QLabel(tr("Font:"));
> fontCombo = new QFontComboBox;
> QLabel *sizeLabel = new QLabel(tr("Size:"));
> sizeCombo = new QComboBox;
> QLabel *styleLabel = new QLabel(tr("Style:"));
> styleCombo = new QComboBox;
> QLabel *fontMergingLabel = new QLabel(tr("Automatic Font Merging:"));
>
> QFont font = fontMergingLabel->font(); // ADD THIS LINE
> font.setItalic(true); // ADD THIS LINE
> fontMergingLabel->setFont(font); // ADD THIS LINE
>
> ...
>
> Build and run. The 'Automatic Font Merging' label shows correctly in
> italic on Qt 4.4/Carbon/OS X SDK 10.4u but incorrectly (i.e. it isn't
> italic) on Qt 4.5/Cocoa/OS X SDK 10.5.
This should be fixed for the release candidate.
Thanks for the report,
-- Trenton
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback