-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (23 loc) · 1.01 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog
from PyQt5.QtGui import QIcon
import sys
from image_editor_widget import ImageEditorWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
# Open a file dialog to select an image
file_dialog = QFileDialog()
image_path, _ = file_dialog.getOpenFileName(None, "Select Image", "", "Images (*.png *.xpm *.jpg *.bmp);;All Files (*)")
if not image_path:
sys.exit()
# Create and show the main application window
window = QMainWindow()
window.setGeometry(100, 100, 800, 600)
window.setWindowTitle("Sega Genesis Copper Colorized Editor")
# Set a custom icon for the window
#icon_path = "icono.png" # Cambia la ruta según sea necesario
#window.setWindowIcon(QIcon(icon_path))
window.showMaximized() # Show maximized
# Create and set the central widget as the ImageEditorWidget
image_editor = ImageEditorWidget(image_path)
window.setCentralWidget(image_editor)
sys.exit(app.exec_())