mirror of
https://github.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI.git
synced 2026-09-05 05:35:11 +00:00
11/06/2021
This commit is contained in:
@@ -253,6 +253,12 @@ I will try to always record a new tutorial when adding a new Widget and updating
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="row_3_layout"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="row_4_layout"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="row_5_layout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
@@ -262,9 +268,7 @@ I will try to always record a new tutorial when adding a new Widget and updating
|
||||
<widget class="QWidget" name="page_3">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame {
|
||||
background: lightgreen;
|
||||
font-size: 16pt;
|
||||
border-radius: 8px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="page_3_layout">
|
||||
|
||||
@@ -124,6 +124,16 @@ class Ui_MainPages(object):
|
||||
|
||||
self.verticalLayout.addLayout(self.row_3_layout)
|
||||
|
||||
self.row_4_layout = QVBoxLayout()
|
||||
self.row_4_layout.setObjectName(u"row_4_layout")
|
||||
|
||||
self.verticalLayout.addLayout(self.row_4_layout)
|
||||
|
||||
self.row_5_layout = QVBoxLayout()
|
||||
self.row_5_layout.setObjectName(u"row_5_layout")
|
||||
|
||||
self.verticalLayout.addLayout(self.row_5_layout)
|
||||
|
||||
self.scroll_area.setWidget(self.contents)
|
||||
|
||||
self.page_2_layout.addWidget(self.scroll_area)
|
||||
@@ -132,9 +142,7 @@ class Ui_MainPages(object):
|
||||
self.page_3 = QWidget()
|
||||
self.page_3.setObjectName(u"page_3")
|
||||
self.page_3.setStyleSheet(u"QFrame {\n"
|
||||
" background: lightgreen;\n"
|
||||
" font-size: 16pt;\n"
|
||||
" border-radius: 8px;\n"
|
||||
"}")
|
||||
self.page_3_layout = QVBoxLayout(self.page_3)
|
||||
self.page_3_layout.setObjectName(u"page_3_layout")
|
||||
|
||||
@@ -16,7 +16,10 @@
|
||||
|
||||
# IMPORT PACKAGES AND MODULES
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from gui.widgets.py_table_widget.py_table_widget import PyTableWidget
|
||||
from . functions_main_window import *
|
||||
import sys
|
||||
import os
|
||||
|
||||
# IMPORT QT CORE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
@@ -443,6 +446,68 @@ class SetupMainWindow:
|
||||
self.push_button_2.setMinimumHeight(40)
|
||||
self.push_button_2.setIcon(self.icon_2)
|
||||
|
||||
# PY LINE EDIT
|
||||
self.line_edit = PyLineEdit(
|
||||
text = "",
|
||||
place_holder_text = "Place holder text",
|
||||
radius = 8,
|
||||
border_size = 2,
|
||||
color = self.themes["app_color"]["text_foreground"],
|
||||
selection_color = self.themes["app_color"]["white"],
|
||||
bg_color = self.themes["app_color"]["dark_one"],
|
||||
bg_color_active = self.themes["app_color"]["dark_three"],
|
||||
context_color = self.themes["app_color"]["context_color"]
|
||||
)
|
||||
self.line_edit.setMinimumHeight(30)
|
||||
|
||||
# TABLE WIDGETS
|
||||
self.table_widget = PyTableWidget(
|
||||
radius = 8,
|
||||
color = self.themes["app_color"]["text_foreground"],
|
||||
selection_color = self.themes["app_color"]["context_color"],
|
||||
bg_color = self.themes["app_color"]["bg_two"],
|
||||
header_horizontal_color = self.themes["app_color"]["dark_two"],
|
||||
header_vertical_color = self.themes["app_color"]["bg_three"],
|
||||
bottom_line_color = self.themes["app_color"]["bg_three"],
|
||||
grid_line_color = self.themes["app_color"]["bg_one"],
|
||||
scroll_bar_bg_color = self.themes["app_color"]["bg_one"],
|
||||
scroll_bar_btn_color = self.themes["app_color"]["dark_four"],
|
||||
context_color = self.themes["app_color"]["context_color"]
|
||||
)
|
||||
self.table_widget.setColumnCount(3)
|
||||
self.table_widget.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||
self.table_widget.setSelectionMode(QAbstractItemView.ExtendedSelection)
|
||||
self.table_widget.setSelectionBehavior(QAbstractItemView.SelectRows)
|
||||
|
||||
# Columns / Header
|
||||
self.column_1 = QTableWidgetItem()
|
||||
self.column_1.setTextAlignment(Qt.AlignCenter)
|
||||
self.column_1.setText("NAME")
|
||||
|
||||
self.column_2 = QTableWidgetItem()
|
||||
self.column_2.setTextAlignment(Qt.AlignCenter)
|
||||
self.column_2.setText("NICK")
|
||||
|
||||
self.column_3 = QTableWidgetItem()
|
||||
self.column_3.setTextAlignment(Qt.AlignCenter)
|
||||
self.column_3.setText("PASS")
|
||||
|
||||
# Set column
|
||||
self.table_widget.setHorizontalHeaderItem(0, self.column_1)
|
||||
self.table_widget.setHorizontalHeaderItem(1, self.column_2)
|
||||
self.table_widget.setHorizontalHeaderItem(2, self.column_3)
|
||||
|
||||
for x in range(10):
|
||||
row_number = self.table_widget.rowCount()
|
||||
self.table_widget.insertRow(row_number) # Insert row
|
||||
self.table_widget.setItem(row_number, 0, QTableWidgetItem(str("Wanderson"))) # Add name
|
||||
self.table_widget.setItem(row_number, 1, QTableWidgetItem(str("vfx_on_fire_" + str(x)))) # Add nick
|
||||
self.pass_text = QTableWidgetItem()
|
||||
self.pass_text.setTextAlignment(Qt.AlignCenter)
|
||||
self.pass_text.setText("12345" + str(x))
|
||||
self.table_widget.setItem(row_number, 2, self.pass_text) # Add pass
|
||||
self.table_widget.setRowHeight(row_number, 22)
|
||||
|
||||
# ADD WIDGETS
|
||||
self.ui.load_pages.row_1_layout.addWidget(self.circular_progress_1)
|
||||
self.ui.load_pages.row_1_layout.addWidget(self.circular_progress_2)
|
||||
@@ -456,6 +521,8 @@ class SetupMainWindow:
|
||||
self.ui.load_pages.row_3_layout.addWidget(self.icon_button_3)
|
||||
self.ui.load_pages.row_3_layout.addWidget(self.push_button_1)
|
||||
self.ui.load_pages.row_3_layout.addWidget(self.push_button_2)
|
||||
self.ui.load_pages.row_4_layout.addWidget(self.line_edit)
|
||||
self.ui.load_pages.row_5_layout.addWidget(self.table_widget)
|
||||
|
||||
# RIGHT COLUMN
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
# IMPORT PACKAGES AND MODULES
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from gui.core.functions import Functions
|
||||
from gui.widgets.py_credits_bar.py_credits import PyCredits
|
||||
|
||||
# IMPORT QT CORE
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
@@ -47,6 +46,10 @@ from gui.uis.pages.ui_main_pages import Ui_MainPages
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from gui.uis.columns.ui_right_column import Ui_RightColumn
|
||||
|
||||
# CREDITS
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
from gui.widgets.py_credits_bar.py_credits import PyCredits
|
||||
|
||||
# PY WINDOW
|
||||
# ///////////////////////////////////////////////////////////////
|
||||
class UI_MainWindow(object):
|
||||
@@ -164,6 +167,7 @@ class UI_MainWindow(object):
|
||||
btn_color_pressed = self.themes['app_color']['bg_one'],
|
||||
icon_color = self.themes['app_color']['icon_color'],
|
||||
icon_color_hover = self.themes['app_color']['icon_hover'],
|
||||
context_color = self.themes['app_color']['context_color'],
|
||||
icon_color_pressed = self.themes['app_color']['icon_pressed'],
|
||||
icon_close_path = Functions.set_svg_icon("icon_close.svg")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user