-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.6.0
-
None
QTextDocument does not support nested HTML blocks
The inner block's formatting is not respected.
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QString html_sequence = QString(" \
<html> \
<head> \
<style type=text/css> \
body { background: #ffffff; color: black; } \
.title { background: #f0f0f0; align: center; } \
.subtitle { font-size: 8px; color: red;} \
.small-subtitle { font-size: 6px; color: blue; } \
</style> \
</head> \
\
<body> \
<h1 class=title>Title without subtitle<br /></h1> \
<h1 class=title>Title with subtitle<br /><span class=subtitle>This is the subtitle</span></h1> \
<h1 class=title>Title with small subtitle<br /><span class=small-subtitle>This is the small subtitle</span></h1> \
</body> \
</html> \
");
QTextEdit test(html_sequence);
test.show();
return app.exec();
}