fix: Import von QAction in PyQt6.QtGui korrigiert
Co-authored-by: aider (ollama/qwen2.5-coder:14b) <aider@aider.chat>
This commit is contained in:
1 parent
3018ac46d6
commit
f565975150
1 file changed
+54
-10
@@ -1,14 +1,58 @@
|
|||||||
# Deaktivieren Sie die virtuelle Umgebung
|
import sys
|
||||||
deactivate
|
from PyQt6.QtWidgets import QApplication, QMainWindow, QMenuBar, QMenu, QWidget, QVBoxLayout, QPushButton, QHBoxLayout
|
||||||
|
from PyQt6.QtGui import QAction
|
||||||
|
from PyQt6.QtCore import Qt
|
||||||
|
|
||||||
# Löschen Sie die virtuelle Umgebung
|
class MainWindow(QMainWindow):
|
||||||
rm -rf venv
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
# Erstellen Sie eine neue virtuelle Umgebung
|
self.setWindowTitle("Mini-DAW")
|
||||||
python -m venv venv
|
self.setGeometry(100, 100, 800, 600)
|
||||||
|
self.setStyleSheet("background-color: #121212; color: white;")
|
||||||
|
|
||||||
# Aktivieren Sie die virtuelle Umgebung
|
# Menüleiste
|
||||||
venv\Scripts\activate
|
menu_bar = QMenuBar(self)
|
||||||
|
self.setMenuBar(menu_bar)
|
||||||
|
|
||||||
# Installieren Sie PyQt6
|
file_menu = QMenu("Datei", self)
|
||||||
pip install PyQt6
|
menu_bar.addMenu(file_menu)
|
||||||
|
|
||||||
|
new_action = QAction("Neu", self)
|
||||||
|
file_menu.addAction(new_action)
|
||||||
|
|
||||||
|
open_action = QAction("Öffnen", self)
|
||||||
|
file_menu.addAction(open_action)
|
||||||
|
|
||||||
|
save_action = QAction("Speichern", self)
|
||||||
|
file_menu.addAction(save_action)
|
||||||
|
|
||||||
|
# Arbeitsbereich für Audio-Spuren
|
||||||
|
central_widget = QWidget(self)
|
||||||
|
self.setCentralWidget(central_widget)
|
||||||
|
|
||||||
|
layout = QVBoxLayout()
|
||||||
|
central_widget.setLayout(layout)
|
||||||
|
|
||||||
|
# Play/Pause-Buttons
|
||||||
|
button_layout = QHBoxLayout()
|
||||||
|
layout.addLayout(button_layout)
|
||||||
|
|
||||||
|
play_button = QPushButton("Play", self)
|
||||||
|
play_button.setStyleSheet("background-color: #007acc; color: white; padding: 10px 20px; border-radius: 5px;")
|
||||||
|
button_layout.addWidget(play_button)
|
||||||
|
|
||||||
|
pause_button = QPushButton("Pause", self)
|
||||||
|
pause_button.setStyleSheet("background-color: #ff5722; color: white; padding: 10px 20px; border-radius: 5px;")
|
||||||
|
button_layout.addWidget(pause_button)
|
||||||
|
|
||||||
|
# Arbeitsbereich für Audio-Spuren (Platzhalter)
|
||||||
|
track_area = QWidget(self)
|
||||||
|
track_area.setStyleSheet("background-color: #222222; border: 1px solid #333333;")
|
||||||
|
layout.addWidget(track_area)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
window.show()
|
||||||
|
sys.exit(app.exec())
|
||||||
Reference in new issue
Block a user