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
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.