Log management ok
This commit is contained in:
parent
099a07b08b
commit
62681cc80f
|
|
@ -44,14 +44,18 @@ class Logs_Management(Widget):
|
|||
|
||||
def adjust_column_widths(self):
|
||||
"""Adjust the widths of columns to fit their content."""
|
||||
# Assuming self.crud has an attribute 'table' that is a QTableWidget or QTableView
|
||||
if hasattr(self.crud, 'table') and isinstance(self.crud.table, (QTableWidget,)):
|
||||
self.crud.table.resizeColumnsToContents()
|
||||
# Ensure that Crud has db_tw which is a QTableWidget
|
||||
if hasattr(self.crud, 'db_tw') and isinstance(self.crud.db_tw, QTableWidget):
|
||||
# Optionally, resize all columns to fit their contents initially
|
||||
self.crud.db_tw.resizeColumnsToContents()
|
||||
|
||||
# Set a specific column width for columns; for example, set 'Info' column
|
||||
for column in range(self.crud.db_tw.columnCount()):
|
||||
self.crud.db_tw.setColumnWidth(column, 200) # Set width to 300 pixels
|
||||
|
||||
def row_filter(self, row, row_number, crud):
|
||||
try:
|
||||
if row["info_type"] != "Download":
|
||||
return False, None, False
|
||||
|
||||
|
||||
log_entry = log.generate(
|
||||
id=row["id"],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Logs_Management</class>
|
||||
<class>Users_Management</class>
|
||||
<widget class="QWidget" name="Users_Management">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user