Skip to content

Commit

Permalink
fix:head lazy load
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Apr 17, 2022
1 parent 473c617 commit 15702d8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 34 deletions.
1 change: 1 addition & 0 deletions dictheadwords.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ DictHeadwords::DictHeadwords( QWidget *parent, Config::Class & cfg_,

connect(model,&HeadwordListModel::finished,this,[this](){
ui.exportButton->setEnabled(true);
ui.progressBar->hide();
});
proxy = new QSortFilterProxyModel( this );

Expand Down
81 changes: 47 additions & 34 deletions dictheadwords.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,46 @@
<item row="3" column="0">
<widget class="QListView" name="headersListView"/>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="autoApply">
<property name="toolTip">
<string>If checked any filter changes will we immediately applied to headwords list</string>
</property>
<property name="text">
<string>Auto apply</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="filterLine">
<property name="toolTip">
<string>Filter string (fixed string, wildcards or regular expression)</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Filter:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="applyButton">
<property name="toolTip">
<string>Press this button to apply filter to headwords list</string>
</property>
<property name="text">
<string>Apply</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
Expand Down Expand Up @@ -95,44 +135,17 @@
</item>
</layout>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="applyButton">
<property name="toolTip">
<string>Press this button to apply filter to headwords list</string>
<item row="4" column="0">
<widget class="QProgressBar" name="progressBar">
<property name="maximum">
<number>0</number>
</property>
<property name="text">
<string>Apply</string>
<property name="value">
<number>-1</number>
</property>
<property name="autoDefault">
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="autoApply">
<property name="toolTip">
<string>If checked any filter changes will we immediately applied to headwords list</string>
</property>
<property name="text">
<string>Auto apply</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Filter:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="filterLine">
<property name="toolTip">
<string>Filter string (fixed string, wildcards or regular expression)</string>
</property>
</widget>
</item>
</layout>
Expand Down

0 comments on commit 15702d8

Please sign in to comment.