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

Creator: Find and Replace multi-line



  • I want to replace the following lines

        virtual void paint(QPainter* painter,
                           const QStyleOptionGraphicsItem* option,
                           QWidget* widget);
    

    with

        virtual void paint(QPainter* painter,
                           const QStyleOptionGraphicsItem* option,
                           QWidget* widget) override;
    

    How would I do that in Qt Creator? I have tried to figure out a regular expression that includes line breaks and allows for the whitespaces at the beginning of the second and third line, but my searches always come up empty. In fact, as soon as I activate "regular expressions", even a single-line search for

    virtual void paint(QPainter* painter,
    

    comes up empty.


Log in to reply