本文整理匯總了Python中PySide.QtGui.QFrame.setVisible方法的典型用法代碼示例。如果您正苦於以下問題:Python QFrame.setVisible方法的具體用法?Python QFrame.setVisible怎麽用?Python QFrame.setVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PySide.QtGui.QFrame
的用法示例。
在下文中一共展示了QFrame.setVisible方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: window
# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setVisible [as 別名]
class window(QMainWindow):
"""Main window."""
def __init__(self, parent=None):
"""Initialize the parent class of this instance."""
super(window, self).__init__(parent)
app.aboutToQuit.connect(self.myExitHandler)
self.style_sheet = self.styleSheet('style')
# app.setStyle(QStyleFactory.create('Macintosh'))
#app.setStyleSheet(self.style_sheet)
self.layout().setSpacing(0)
self.layout().setContentsMargins(0,0,0,0)
app.setOrganizationName("Eivind Arvesen")
app.setOrganizationDomain("https://github.com/eivind88/raskolnikov")
app.setApplicationName("Raskolnikov")
app.setApplicationVersion("0.0.1")
settings = QSettings()
self.data_location = QDesktopServices.DataLocation
self.temp_location = QDesktopServices.TempLocation
self.cache_location = QDesktopServices.CacheLocation
self.startpage = "https://duckduckgo.com/"
self.new_tab_behavior = "insert"
global bookmarks
global saved_tabs
print "Currently saved_tabs:\n", saved_tabs
global menubar
menubar = QMenuBar()
# Initialize a statusbar for the window
self.statusbar = self.statusBar()
self.statusbar.setFont(QFont("Helvetica Neue", 11, QFont.Normal))
self.statusbar.setStyleSheet(self.style_sheet)
self.statusbar.setMinimumHeight(15)
self.pbar = QProgressBar()
self.pbar.setMaximumWidth(100)
self.statusbar.addPermanentWidget(self.pbar)
self.statusbar.hide()
self.setMinimumSize(504, 235)
# self.setWindowModified(True)
# app.alert(self, 0)
self.setWindowTitle("Raskolnikov")
# toolbar = self.addToolBar('Toolbar')
# toolbar.addAction(exitAction)
# self.setUnifiedTitleAndToolBarOnMac(True)
self.setWindowIcon(QIcon(""))
# Create input widgets
self.bbutton = QPushButton(u"<")
self.fbutton = QPushButton(u">")
self.hbutton = QPushButton(u"⌂")
self.edit = QLineEdit("")
self.edit.setFont(QFont("Helvetica Neue", 12, QFont.Normal))
self.edit.setPlaceholderText("Enter URL")
# self.edit.setMinimumSize(400, 24)
self.rbutton = QPushButton(u"↻")
self.dbutton = QPushButton(u"☆")
self.tbutton = QPushButton(u"⁐")
# ↆ ⇧ √ ⌘ ⏎ ⏏ ⚠ ✓ ✕ ✖ ✗ ✘ ::: ❤ ☮ ☢ ☠ ✔ ☑ ♥ ✉ ☣ ☤ ✘ ☒ ♡ ツ ☼ ☁ ❅ ✎
self.nbutton = QPushButton(u"+")
self.nbutton.setObjectName("NewTab")
self.nbutton.setMinimumSize(35, 30)
self.nbutton.setSizePolicy(QSizePolicy.Minimum,QSizePolicy.Minimum)
self.edit.setTextMargins(2, 1, 2, 0)
# create a horizontal layout for the input
input_layout = QHBoxLayout()
input_layout.setSpacing(4)
input_layout.setContentsMargins(0, 0, 0, 0)
# add the input widgets to the input layout
input_layout.addWidget(self.bbutton)
input_layout.addWidget(self.fbutton)
input_layout.addWidget(self.hbutton)
input_layout.addWidget(self.edit)
input_layout.addWidget(self.rbutton)
input_layout.addWidget(self.dbutton)
input_layout.addWidget(self.tbutton)
# create a widget to hold the input layout
self.input_widget = QFrame()
self.input_widget.setObjectName("InputWidget")
self.input_widget.setStyleSheet(self.style_sheet)
# set the layout of the widget
self.input_widget.setLayout(input_layout)
self.input_widget.setVisible(True)
# CREATE BOOKMARK-LINE HERE
#.........這裏部分代碼省略.........