Important: Please read the Qt Code of Conduct -

Add link to some format text

    I am programming a QTextEdit to write c++, and use QTextBrowser for c++ debug output.
    Regular expressions is too difficult to me:
    boxkey.cpp:27:24: error: ‘stbi_load’ was not declared in this scope
    <a href='boxkey.cpp:27:24: error:'>boxkey.cpp:27:24: error:</a> ‘stbi_load’ was not declared in this scope

    This has been done: then use QTextBrowser::anchorClicked to set QTextEdit::QTextCursor to the error line.

  • Lifetime Qt Champion


    You don't necessarily need regular expressions. Since you know the structure of the line you can split on the colon and rebuild your new string using the string list resulting from the split.

Log in to reply