View Single Post
Old 06-19-2020, 04:11 PM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Does it help to force the use of the execCommand javascript like we used for Qt 5.9.5 instead:

See this snippet in PageEdit's MainWindow.cpp:

Code:
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
void MainWindow::Bold()               { m_WebView->triggerPageAction(QWebEnginePage::ToggleBold);          }
void MainWindow::Italic()             { m_WebView->triggerPageAction(QWebEnginePage::ToggleItalic);        }
void MainWindow::Underline()          { m_WebView->triggerPageAction(QWebEnginePage::ToggleUnderline);     }
void MainWindow::Strikethrough()      { m_WebView->triggerPageAction(QWebEnginePage::ToggleStrikethrough); }
void MainWindow::AlignLeft()          { m_WebView->triggerPageAction(QWebEnginePage::AlignLeft);           }
void MainWindow::AlignCenter()        { m_WebView->triggerPageAction(QWebEnginePage::AlignCenter);         }
void MainWindow::AlignRight()         { m_WebView->triggerPageAction(QWebEnginePage::AlignRight);          }
void MainWindow::AlignJustify()       { m_WebView->triggerPageAction(QWebEnginePage::AlignJustified);      }
void MainWindow::DecreaseIndent()     { m_WebView->triggerPageAction(QWebEnginePage::Outdent);             }
void MainWindow::IncreaseIndent()     { m_WebView->triggerPageAction(QWebEnginePage::Indent);              }
void MainWindow::InsertBulletedList() { m_WebView->triggerPageAction(QWebEnginePage::InsertUnorderedList); }
void MainWindow::InsertNumberedList() { m_WebView->triggerPageAction(QWebEnginePage::InsertOrderedList);   }
#else
void MainWindow::Bold()               { m_WebView->ExecCommand("bold");                }
void MainWindow::Italic()             { m_WebView->ExecCommand("italic");              }
void MainWindow::Underline()          { m_WebView->ExecCommand("underline");           }
void MainWindow::Strikethrough()      { m_WebView->ExecCommand("strikeThrough");       }
void MainWindow::AlignLeft()          { m_WebView->ExecCommand("justifyLeft");         }
void MainWindow::AlignCenter()        { m_WebView->ExecCommand("justifyCenter");       }
void MainWindow::AlignRight()         { m_WebView->ExecCommand("justifyRight");        }
void MainWindow::AlignJustify()       { m_WebView->ExecCommand("justifyFull");         }
void MainWindow::DecreaseIndent()     { m_WebView->ExecCommand("outdent");             }
void MainWindow::IncreaseIndent()     { m_WebView->ExecCommand("indent");              }
void MainWindow::InsertBulletedList() { m_WebView->ExecCommand("insertUnorderedList"); }
void MainWindow::InsertNumberedList() { m_WebView->ExecCommand("insertOrderedList");   }
#endif
KevinH is offline   Reply With Quote