A custom working Qt-based dialog with Find, Replace and RegEX search functionalities based on the Extension Example. You are Free to use this project under the BSD-3 Clause License. Please refer the License Terms for your project compatibility. There are two available dialogs:
Type | Function |
---|---|
explicit | FindDialog(QWidget *parent = nullptr) |
void | setEditor(QPlainTextEdit *editor) |
QPlainTextEdit* | getEditor() |
Type | Function |
---|---|
void | find() |
void | regexMode() |
Type | Function |
---|---|
explicit | FindReplaceDialog(QWidget *parent = nullptr) |
void | setEditor(QPlainTextEdit *editor) |
QPlainTextEdit* | getEditor() |
Type | Function |
---|---|
void | find() |
void | replace() |
void | replaceAll() |
void | regexMode() |
The more button expands the remaining available options with its individual functionality provided as seen here:
The more button expands the same as it expanded before in FindDialog with the options.
Finds the query text from the find field in the editor, sets a selection to the found substring and sets the cursor at the end.
If regex-CheckBox is ticked, this method runs ensuring a Regular Expression mode for the find dialog to
FindReplaceDialog inherits from QDialog and contains all the functions and properties from FindDialog.
Finds the query text from the find field in the editor, sets a selection to the found substring and sets the cursor at the end.
Replaces all occurences of the query selected by find() and the sets the cursor at the end of the last substring replaced.
If regex-CheckBox is ticked, this method runs ensuring a Regular Expression mode for the find dialog to
QPlainTextEdit *myEditor = new QPlainTextEdit;
FindDialog *fdialog = new FindDialog(this);
fdialog->setEditor(myEditor);
fdialog->show();
QPlainTextEdit *myEditor = new QPlainTextEdit;
FindReplaceDialog *frDialog = new FindReplaceDialog(this);
frdialog->setEditor(myEditor);
frdialog->show();