Add search function

Add the possibility to search in the content
Display only line where a match was found
Highlight match
This commit is contained in:
2022-12-16 12:40:29 +00:00
parent 03c0ad0635
commit 28585c1089
4 changed files with 82 additions and 36 deletions

View File

@ -13,6 +13,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true">font: 11pt &quot;UbuntuMono NF&quot;;</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QSplitter" name="splitter">
@ -22,7 +25,7 @@
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLineEdit" name="lineEdit">
<widget class="QLineEdit" name="search_line_edit">
<property name="text">
<string>Search</string>
</property>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1214</width>
<height>896</height>
<height>888</height>
</rect>
</property>
<property name="windowTitle">
@ -15,7 +15,7 @@
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(42, 42, 42);
font: 12pt &quot;UbuntuMono NF&quot;;
font: 11pt &quot;UbuntuMono NF&quot;;
selection-background-color: rgb(105, 105, 105);
color: rgb(230, 230, 230);</string>
</property>
@ -48,24 +48,27 @@ background-color: rgb(105, 105, 105);</string>
<enum>Qt::Horizontal</enum>
</property>
<property name="handleWidth">
<number>4</number>
<number>2</number>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>4</number>
<number>2</number>
</property>
<item>
<widget class="QLineEdit" name="lineEdit">
<widget class="QLineEdit" name="search_line_edit">
<property name="styleSheet">
<string notr="true">background-color: rgb(42, 42, 42);</string>
</property>
<property name="text">
<string>Search</string>
<string/>
</property>
<property name="frame">
<bool>false</bool>
</property>
<property name="placeholderText">
<string>Search...</string>
</property>
</widget>
</item>
<item>
@ -80,19 +83,13 @@ background-color: rgb(105, 105, 105);</string>
</item>
</layout>
</widget>
<widget class="QPlainTextEdit" name="detail_plain_text_edit">
<widget class="QTextEdit" name="detail_text_edit">
<property name="styleSheet">
<string notr="true">background-color: rgb(42, 42, 42);</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="undoRedoEnabled">
<bool>false</bool>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>