addu
8th October 2009, 09:53
Hi all
I want to set the text in between rectangular..
code is
QString html,text;
html = "<html><head><body><div style=width: 1000px; height:1500px; border: 1ex solid black>Text </div></body></html>";
/
// Crate a QTextDocument with the defined HTML, CSS and the images
QTextDocument *doc = new QTextDocument;
/*
* This shows how to bind the images, where the name for QUrl is the same name
* which you use in your HTML and CSS. In QPixmap just use the normal syntax of
* the Qt resource system.
*/
/*
* And now bind the css, which you have defined in the QString css.
*/
doc->addResource( QTextDocument::StyleSheetResource, QUrl( "format.css" ), css );
doc->setHtml( html ); // binds the HTML to the QTextDocument
/*
* This QTextDocument can now set to any QTextBrowser.
*/
QTextBrowser *tb = new QTextBrowser( 0 );
ui->textBrowser->setDocument( doc );
Here i don't the rectangle.
please help me
Thanks
Yuvaraj R
I want to set the text in between rectangular..
code is
QString html,text;
html = "<html><head><body><div style=width: 1000px; height:1500px; border: 1ex solid black>Text </div></body></html>";
/
// Crate a QTextDocument with the defined HTML, CSS and the images
QTextDocument *doc = new QTextDocument;
/*
* This shows how to bind the images, where the name for QUrl is the same name
* which you use in your HTML and CSS. In QPixmap just use the normal syntax of
* the Qt resource system.
*/
/*
* And now bind the css, which you have defined in the QString css.
*/
doc->addResource( QTextDocument::StyleSheetResource, QUrl( "format.css" ), css );
doc->setHtml( html ); // binds the HTML to the QTextDocument
/*
* This QTextDocument can now set to any QTextBrowser.
*/
QTextBrowser *tb = new QTextBrowser( 0 );
ui->textBrowser->setDocument( doc );
Here i don't the rectangle.
please help me
Thanks
Yuvaraj R