标题:有关QTextBrowser的用法
作者:deer
日期:2006-06-06 12:02
内容:
我在程序里面是这么写的:
#include
#include
#include
int main(int argc,char** argv)
{
QApplication a(argc,argv);
QWidget mainwindow;
mainwindow.setMaximumSize(400,200);
mainwindow.setMinimumSize(400,200);
QTextBrowser m_phtmlBrowser(&mainwindow);
m_phtmlBrowser.setSource(QString("http://www.google.com.cn"));
mainwindow.show();
return a.exec();
}
怎么就只显示不出页面呢?
请高手指点一下
#1 [xuxinshao 09-22 16:27]
QTextBrowser只是读取html文件,不能这样用吧
#2 [style 09-22 18:38]
virtual QTextBrowser::setSource(const QUrl &);
这里QUrl是能是本地的一个html文件路径