當前位置: 首頁>>代碼示例>>Python>>正文


Python QFrame.setFixedHeight方法代碼示例

本文整理匯總了Python中PySide.QtGui.QFrame.setFixedHeight方法的典型用法代碼示例。如果您正苦於以下問題:Python QFrame.setFixedHeight方法的具體用法?Python QFrame.setFixedHeight怎麽用?Python QFrame.setFixedHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PySide.QtGui.QFrame的用法示例。


在下文中一共展示了QFrame.setFixedHeight方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFixedHeight [as 別名]
 def __init__(self, sync_manager, network_access_manager, url=None, username=None, password=None, certificate=""):
     self.sync_manager = sync_manager
     self.nam = network_access_manager
     self.certificate = certificate
     self.replies = set()
     super(SettingsWindow, self).__init__()
     self.setWindowIcon(QIcon(os.path.join('icons', 'Logo_sync.png')))
     self.setGeometry(70, 60, 300, 250)
     self.setWindowTitle("c't SESAM Sync Settings")
     layout = QBoxLayout(QBoxLayout.TopToBottom)
     layout.setContentsMargins(0, 0, 0, 0)
     # Header bar
     header_bar = QFrame()
     header_bar.setStyleSheet("QWidget { background: rgb(40, 40, 40); } " +
                              "QToolButton { background: rgb(40, 40, 40); }" +
                              "QToolTip { color: rgb(255, 255, 255); background-color: rgb(20, 20, 20); " +
                              "border: 1px solid white; }")
     header_bar.setAutoFillBackground(True)
     header_bar.setFixedHeight(45)
     header_bar_layout = QBoxLayout(QBoxLayout.RightToLeft)
     header_bar_layout.addStretch()
     header_bar.setLayout(header_bar_layout)
     layout.addWidget(header_bar)
     self.create_header_bar(header_bar_layout)
     self.certificate_loaded.connect(self.test_connection)
     # Main area
     main_area = QFrame()
     main_layout = QBoxLayout(QBoxLayout.TopToBottom)
     main_area.setLayout(main_layout)
     layout.addWidget(main_area)
     self.create_main_area(main_layout, url, username, password)
     # Show the window
     layout.addStretch()
     self.setLayout(layout)
     self.show()
開發者ID:JPO1,項目名稱:ctSESAM-pyside,代碼行數:37,代碼來源:settings_window.py

示例2: __init__

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFixedHeight [as 別名]
 def __init__(self):
     super(MainWindow, self).__init__()
     self.nam = QNetworkAccessManager()
     self.setWindowIcon(QIcon(os.path.join('icons', 'Logo_rendered_edited.png')))
     layout = QBoxLayout(QBoxLayout.TopToBottom)
     layout.setContentsMargins(0, 0, 0, 0)
     self.preference_manager = PreferenceManager()
     self.kgk_manager = KgkManager()
     self.kgk_manager.set_preference_manager(self.preference_manager)
     self.settings_manager = PasswordSettingsManager(self.preference_manager)
     self.setting_dirty = True
     # Header bar
     header_bar = QFrame()
     header_bar.setStyleSheet(
         "QWidget { background: rgb(40, 40, 40); } " +
         "QToolButton { background: rgb(40, 40, 40); }" +
         "QToolTip { color: rgb(255, 255, 255); background-color: rgb(20, 20, 20); " +
         "border: 1px solid white; }")
     header_bar.setAutoFillBackground(True)
     header_bar.setFixedHeight(45)
     header_bar_layout = QBoxLayout(QBoxLayout.LeftToRight)
     header_bar_layout.addStretch()
     header_bar.setLayout(header_bar_layout)
     layout.addWidget(header_bar)
     self.create_header_bar(header_bar_layout)
     # Widget area
     main_area = QFrame()
     main_layout = QBoxLayout(QBoxLayout.TopToBottom)
     main_area.setLayout(main_layout)
     layout.addWidget(main_area)
     self.create_main_area(main_layout)
     # Window layout
     layout.addStretch()
     main_layout.addStretch()
     self.setLayout(layout)
     settings = QSettings()
     size = settings.value("MainWindow/size")
     if not size:
         size = QSize(350, 450)
     self.resize(size)
     position = settings.value("MainWindow/pos")
     if not position:
         position = QPoint(0, 24)
     self.move(position)
     self.setWindowTitle("c't SESAM")
     self.master_password_edit.setFocus()
     self.show()
開發者ID:pinae,項目名稱:ctSESAM-pyside,代碼行數:49,代碼來源:ctSESAM.py


注:本文中的PySide.QtGui.QFrame.setFixedHeight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。