Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to convert QsciDocument to QTextDocument?



  • hi !

    i want to make editor with Qscintilla
    and i need to serach all function,
    so i write this

    m_Write = new QsciScintilla(this);
    QTextDocument *document = m_Write->document();
    QTextCursor highlightCursor(document);
    QTextCursor cursor(document);

    but
    error: cannot convert 'QsciDocument' to 'QTextDocument*' in initialization

    how to convert 'QsciDocument' to 'QTextDocument*' ?
    or
    other way to find all word ?


  • Moderators

    @taek-seo said:

    how to convert 'QsciDocument' to 'QTextDocument*' ?
    or
    other way to find all word ?

    you don't since it doesn't subclass QTextDocument.

    Also i don't see any accessible methods in the QsciDocument class?!