I am using QTextBrowser to display some large html pages.
Before I show the data, I spawn a little QMovie loading indicator, and then I call
{
void showcontent(const QString& s);
};
void ResultBrowser::showcontent(const QString& s)
{
//I use a QTextDocument for my stylesheet
mTextDocument->setHtml(s);
setDocument(mTextDocument);
}
class ResultBrowser : public QTextBrowser
{
void showcontent(const QString& s);
QTextDocument mTextDocument;
};
void ResultBrowser::showcontent(const QString& s)
{
//I use a QTextDocument for my stylesheet
mTextDocument->setHtml(s);
setDocument(mTextDocument);
}
To copy to clipboard, switch view to plain text mode
Sadly this causes some blocking which causes the loading indicator to pause. I attempted to call my showcontent function through QtConcurrent::run, but it crashes due to events being triggered from the wrong thread.
Suggestions?
Bookmarks