Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TV_OCR
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TVOCR
TV_OCR
Commits
4e281a78
Commit
4e281a78
authored
Apr 19, 2022
by
mucece
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改结果列宽。
parent
ce9caabf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
TV_OCR/initial.py
+21
-10
TV_OCR/sqlite3/instruction.db
+0
-0
No files found.
TV_OCR/initial.py
View file @
4e281a78
...
...
@@ -329,16 +329,16 @@ class Instruction_set(Ui_instruction, QMainWindow):
shutil
.
copyfile
(
old_dir
,
new_dir
)
else
:
pass
if
len
(
self
.
file_paths
)
<=
0
:
return
else
:
h
=
HandleExcel
()
h
.
insert_db
(
self
.
file_paths
)
num
=
len
(
self
.
file_paths
)
QMessageBox
.
information
(
self
,
'提示'
,
'导入完成{}条指令'
.
format
(
num
),
QMessageBox
.
Ok
|
QMessageBox
.
No
,
QMessageBox
.
Ok
)
except
:
if
len
(
self
.
file_paths
)
<=
0
:
QMessageBox
.
information
(
self
,
'提示'
,
'选取文件夹中未找到MP3格式或是wav格式文件'
,
QMessageBox
.
Ok
|
QMessageBox
.
No
,
QMessageBox
.
Ok
)
else
:
h
=
HandleExcel
()
h
.
insert_db
(
self
.
file_paths
)
num
=
len
(
self
.
file_paths
)
QMessageBox
.
information
(
self
,
'提示'
,
'导入完成{}条指令'
.
format
(
num
),
QMessageBox
.
Ok
|
QMessageBox
.
No
,
QMessageBox
.
Ok
)
except
Exception
as
e
:
QMessageBox
.
critical
(
self
,
"错误"
,
"选取文件夹不正确"
,
QMessageBox
.
Ok
|
QMessageBox
.
No
,
QMessageBox
.
Ok
)
...
...
@@ -1437,8 +1437,19 @@ class result_ui(Ui_result,QMainWindow):
# self.tableView.verticalHeader().setVisible(False)
# self.tableView.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
self
.
tableView
.
setModel
(
self
.
model
)
# 隐藏第一列不显示
self
.
tableView
.
hideColumn
(
1
)
# 设置列宽
self
.
tableView
.
resizeColumnToContents
(
0
)
self
.
tableView
.
setColumnWidth
(
0
,
400
)
self
.
tableView
.
setColumnWidth
(
2
,
200
)
self
.
tableView
.
setColumnWidth
(
4
,
200
)
self
.
tableView
.
setColumnWidth
(
5
,
200
)
# 将表格变为禁止编辑
self
.
tableView
.
setEditTriggers
(
QAbstractItemView
.
NoEditTriggers
)
# 设置表格宽度自适应
# self.tableView.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
# self.tableWidget.verticalHeader().setSectionResizeMode(QHeaderView.Stretch) 这个是行宽的
#电视测试多线程
class
Mythread
(
QThread
):
...
...
TV_OCR/sqlite3/instruction.db
View file @
4e281a78
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment