Skip to content

Commit

Permalink
Merge pull request #116 from ChinaIceF/reconst
Browse files Browse the repository at this point in the history
chore: wrote example for simple table in gallery
  • Loading branch information
ChinaIceF authored Aug 14, 2024
2 parents 70a340b + 55ca3c0 commit 15ed347
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions examples/Gallery for siui/components/page_widgets/page_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,21 +568,22 @@ def __init__(self, *args, **kwargs):

self.demo_table_simple = SiTableView(self)
self.demo_table_simple.resize(752, 360)
self.demo_table_simple.addColumn("排名", 64, 40, Qt.AlignLeft | Qt.AlignVCenter)
self.demo_table_simple.addColumn("评级", 96, 40, Qt.AlignHCenter | Qt.AlignVCenter)
self.demo_table_simple.addColumn("完成度", 128, 40, Qt.AlignRight | Qt.AlignVCenter)
self.demo_table_simple.addRow(data=["#1", "SS", "100.00%"])
self.demo_table_simple.addRow(data=["#2", "S", "99.56%"])
self.demo_table_simple.addRow(data=["#3", "S", "96.73%"])
self.demo_table_simple.addRow(data=["#4", "A", "92.35%"])
self.demo_table_simple.addRow(data=["#5", "A", "91.63%"])
self.demo_table_simple.addRow(data=["#6", "B", "88.73%"])
self.demo_table_simple.addRow(data=["#7", "SS", "100.00%"])
self.demo_table_simple.addRow(data=["#8", "S", "99.56%"])
self.demo_table_simple.addRow(data=["#9", "S", "96.73%"])
self.demo_table_simple.addRow(data=["#10", "A", "92.35%"])
self.demo_table_simple.addRow(data=["#11", "A", "91.63%"])
self.demo_table_simple.addRow(data=["#12", "B", "88.73%"])
self.demo_table_simple.addColumn("歌曲名", 196, 40, Qt.AlignLeft | Qt.AlignVCenter)
self.demo_table_simple.addColumn("歌手", 160, 40, Qt.AlignLeft | Qt.AlignVCenter)
self.demo_table_simple.addColumn("专辑", 256, 40, Qt.AlignLeft | Qt.AlignVCenter)
self.demo_table_simple.addColumn("时长", 64, 40, Qt.AlignRight | Qt.AlignVCenter)
self.demo_table_simple.addRow(data=["どうして", "高瀬統也", "どうして (feat. 野田愛実)", "03:01"])
self.demo_table_simple.addRow(data=["風色Letter", "水瀬いのり", "glow", "04:38"])
self.demo_table_simple.addRow(data=["ステンドノクターン", "初音ミク", "ステンドノクターン", "03:39"])
self.demo_table_simple.addRow(data=["鯖鯖", "山崎あおい", "鯖鯖", "05:06"])
self.demo_table_simple.addRow(data=["優しい恋人", "しまも", "優しい恋人", "05:42"])
self.demo_table_simple.addRow(data=["Summer Dream", "Kirara Magic", "Summer Dream (feat. Chevy)", "03:36"])
self.demo_table_simple.addRow(data=["RPG", "Lefty Hand Cream", "Lefty Hand Covers Ⅱ", "04:16"])
self.demo_table_simple.addRow(data=["The des Alizes", "Foxtail-Grass Studio", "Re*Collection", "03:40"])
self.demo_table_simple.addRow(data=["他追着风", "霏泠Ice", "他追着风", "04:39"])
self.demo_table_simple.addRow(data=["ちるちる", "REOL", "Σ", "03:17"])
self.demo_table_simple.addRow(data=["展 / Re: Expansion", "RABPIT", "序章: 弥卢", "04:00"])
self.demo_table_simple.addRow(data=["Never Gonna Give You Up", "Rick Astley", "Whenever You Need Somebody", "03:34"])

self.table_simple.body().addWidget(self.demo_table_simple)
self.table_simple.body().addPlaceholder(12)
Expand Down

0 comments on commit 15ed347

Please sign in to comment.