Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Summary of PyQt5-- index_windows

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

From PyQt5.QtWidgets import QWidget,QGroupBox,QVBoxLayout,QTableWidget QTextEdit# home page class class index_window (QWidget): def _ _ init__ (self): super (). _ _ init__ () # define the window component self.index_tablewidget = QTableWidget (1jue 3) self.index_textedit = QTextEdit () self.initUI () def initUI (self): # window component initialization self.index_tablewidget.setHorizontalHeaderLabels (['1jue remark 2'' '3']) self.index_textedit.setReadOnly (True) # QGroupbox layout table_groupbox = QGroupBox (' site Preview') table_vbox = QVBoxLayout () table_vbox.addWidget (self.index_tablewidget) table_groupbox.setLayout (table_vbox) text_groupbox = QGroupBox ('Operation Information') text_vbox = QVBoxLayout () text _ vbox.addWidget (self.index_textedit) text_groupbox.setLayout (text_vbox) # window layout vbox = QVBoxLayout () vbox.addWidget (table_groupbox) vbox.addWidget (text_groupbox) vbox.setStretchFactor (table_groupbox 7) vbox.setStretchFactor (text_groupbox,3) self.setLayout (vbox)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report