create my toolbox -- first commit
This commit is contained in:
		
							
								
								
									
										26
									
								
								toolbox/main.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								toolbox/main.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
import sys
 | 
			
		||||
import json
 | 
			
		||||
from PySide6.QtWidgets import QMainWindow, QApplication
 | 
			
		||||
 | 
			
		||||
from codes.ui import login_ui, main_ui
 | 
			
		||||
from codes.common import clibs
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class LoginWindow(login_ui.LoginWindow):
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        super().__init__()
 | 
			
		||||
 | 
			
		||||
class MainWindow(main_ui.MainWindow):
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        super().__init__()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    with open(f"{clibs.base_path}/assets/conf/config.json", mode="rt", encoding="utf-8") as f:
 | 
			
		||||
        clibs.account = json.load(f)
 | 
			
		||||
 | 
			
		||||
    app = QApplication(sys.argv)
 | 
			
		||||
    window = LoginWindow()
 | 
			
		||||
    # window = MainWindow()
 | 
			
		||||
    window.show()
 | 
			
		||||
    sys.exit(app.exec())
 | 
			
		||||
		Reference in New Issue
	
	Block a user