Python - Me gustaría saber el nombre del widget que parece una lista desplegable accordeon

 
Vista:
sin imagen de perfil
Val: 7
Ha aumentado su posición en 131 puestos en Python (en relación al último mes)
Gráfica de Python

Me gustaría saber el nombre del widget que parece una lista desplegable accordeon

Publicado por Cristian Felipe (6 intervenciones) el 29/02/2024 04:45:58
Alguno de ustedes sabe cómo se llama ese widget que parece un acordeón para crear menús dejo los pantallazos es que no encuentro el nombre exacto. Y como se crea en pyqt



Screenshot_9
Screenshot_10
Screenshot_10
Screenshot_9
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Francisco Javier
Val: 249
Ha aumentado su posición en 29 puestos en Python (en relación al último mes)
Gráfica de Python

Me gustaría saber el nombre del widget que parece una lista desplegable accordeon

Publicado por Francisco Javier (313 intervenciones) el 20/03/2024 00:26:47
QAccordion
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QPushButton, QGroupBox, QGridLayout
 
 
class MainWindow(QWidget):
    def __init__(self):
        super().__init__()
 
        self.setWindowTitle("Menú Acordeón")
        self.setGeometry(100, 100, 400, 300)
 
        layout = QVBoxLayout()
        self.setLayout(layout)
 
        group1 = QGroupBox("Shonen")
        group2 = QGroupBox("Seinen")
        group3 = QGroupBox("Shoujo")
 
        layout_group1 = QVBoxLayout()
        layout_group2 = QVBoxLayout()
        layout_group3 = QVBoxLayout()
 
        button1 = QPushButton("Naruto")
        button2 = QPushButton("Attack on Titan")
        button3 = QPushButton("Dragon Ball")
 
        button4 = QPushButton("Tokyo Ghoul")
        button5 = QPushButton("Death Note")
        button6 = QPushButton("Berserk")
 
        button7 = QPushButton("Sailor Moon")
        button8 = QPushButton("Cardcaptor Sakura")
        button9 = QPushButton("Fruits Basket")
 
        layout_group1.addWidget(button1)
        layout_group1.addWidget(button2)
        layout_group1.addWidget(button3)
 
        layout_group2.addWidget(button4)
        layout_group2.addWidget(button5)
        layout_group2.addWidget(button6)
 
        layout_group3.addWidget(button7)
        layout_group3.addWidget(button8)
        layout_group3.addWidget(button9)
 
        group1.setLayout(layout_group1)
        group2.setLayout(layout_group2)
        group3.setLayout(layout_group3)
 
        layout.addWidget(group1)
        layout.addWidget(group2)
        layout.addWidget(group3)
 
 
if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec_())
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar