- SVG and PNG icon (256x256) - Desktop entry for application menu - Window icon set in main.py Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
37 lines
901 B
Python
37 lines
901 B
Python
#!/usr/bin/env python3
|
|
"""FileBrowser - Ein Dateimanager mit Vorschau-Funktion in PyQt6."""
|
|
|
|
import sys
|
|
import os
|
|
from PyQt6.QtWidgets import QApplication
|
|
from PyQt6.QtCore import Qt
|
|
from PyQt6.QtGui import QIcon
|
|
|
|
from src.main_window import MainWindow
|
|
|
|
|
|
def main():
|
|
# High DPI Support
|
|
QApplication.setHighDpiScaleFactorRoundingPolicy(
|
|
Qt.HighDpiScaleFactorRoundingPolicy.PassThrough
|
|
)
|
|
|
|
app = QApplication(sys.argv)
|
|
app.setApplicationName("FileBrowser")
|
|
app.setOrganizationName("FileBrowser")
|
|
|
|
# Icon setzen
|
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
icon_path = os.path.join(script_dir, 'resources', 'icon.png')
|
|
if os.path.exists(icon_path):
|
|
app.setWindowIcon(QIcon(icon_path))
|
|
|
|
# Hauptfenster erstellen und anzeigen
|
|
window = MainWindow()
|
|
window.show()
|
|
|
|
sys.exit(app.exec())
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|