[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Test case for Scribe and font weight...
From: Sebastian Sauer <mail () dipe ! org>
Date: 2007-05-18 16:36:18
Message-ID: 200705181836.18485.mail () dipe ! org
[Download RAW message or body]
On Friday 18 May 2007 17:58, you wrote:
> Here is a small test code I just wrote, but it doesn't work.
> After the hello number 55, the text is bold. That's all...
>
> What do you think about it ? Did I do something wrong, or is my Qt4 buggy,
> or are my fonts wrong ?
>
> #include <QApplication>
> #include <QTextEdit>
> #include <QTextCursor>
> #include <QTextCharFormat>
>
> int main (int argc, char **argv) {
> QApplication app (argc, argv);
> QTextEdit *edit = new QTextEdit;
> QTextCursor cursor(edit->textCursor());
> cursor.beginEditBlock();
> QTextCharFormat fmt = cursor.blockCharFormat();
> fmt.setFontPointSize(20);
>
> for (int i = 0 ; i < 100 ; i++) {
> fmt.setFontWeight(i);
> cursor.setCharFormat(fmt);
> cursor.insertText(QString::number(i) + " Hello");
> cursor.insertBlock();
> }
> cursor.endEditBlock();
> edit->show();
> return app.exec();
> }
Does not work here too. There is only a normal (0-55) fontstyle and a bold one
(55-100).
Does anybody have an idea if that's a known bug or just not supported by Qt4
Scribe? The doc http://doc.trolltech.com/4.3/qfont.html#Weight-enum says it
should work...
--
Sebastian Sauer aka dipesh[sebsauer]
http://www.dipe.org/public_key.asc
Fingerprint: 8F1E 219B 16E6 4EC7 29CC F408 E193 65E2 9134 2221
Coder in http://www.koffice.org && http://www.kmldonkey.org
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic