void MarkdownPlugin::onFrameRenderRequested(QWebFrame* frame, bool bUseInlineCss) { if (frame) { render(frame); if (bUseInlineCss) { // wait for code render finished QCoreApplication::processEvents(QEventLoop::AllEvents, 500); changeCssToInline(frame); } } }
void MarkdownPlugin::onFrameRenderRequested(QWebFrame* frame, bool bUseInlineCss) { if (frame) { render(frame); if (bUseInlineCss) { // wait for code render finished QEventLoop loop; QTimer::singleShot(500, &loop, SLOT(quit())); loop.exec(); changeCssToInline(frame); } } }