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


Python QFrame.setFrameShadow方法代碼示例

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


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

示例1: BorderBox

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
 def BorderBox(self, layout):
     from PySide.QtGui import QFrame
     toto = QFrame()
     toto.setLayout(layout)
     toto.setFrameShape(QFrame.Box)
     toto.setFrameShadow(QFrame.Sunken)
     return toto        
開發者ID:Skylion007,項目名稱:LVDOWin,代碼行數:9,代碼來源:GUI.py

示例2: HorizontalDivider

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
def HorizontalDivider():
    """
    Creates a horizontal divider line.
    :return:
    """
    divider = QFrame()
    divider.setFrameShape(QFrame.HLine)
    divider.setFrameShadow(QFrame.Raised)
    return divider
開發者ID:b-sea,項目名稱:HatfieldFX,代碼行數:11,代碼來源:Label.py

示例3: VerticalDivider

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
def VerticalDivider():
    """
    Creates a vertical divider line.
    :return:
    """
    divider = QFrame()
    divider.setFrameShape(QFrame.VLine)
    divider.setFrameShadow(QFrame.Raised)
    return divider
開發者ID:b-sea,項目名稱:HatfieldFX,代碼行數:11,代碼來源:Label.py

示例4: __init__

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
    def __init__(self):
        generic.GenericGui.__init__(self)
        window = QWidget()
        window.setWindowTitle('quichem-pyside')

        self.compiler_view = QListWidget()
        self.compiler_view.currentRowChanged.connect(self.show_source)
        self.stacked_widget = QStackedWidget()
        self.stacked_widget.setFrameStyle(QFrame.StyledPanel | QFrame.Raised)
        self.edit = QLineEdit()
        self.edit.setPlaceholderText('Type quichem input...')
        self.edit.textChanged.connect(self.change_value)
        self.view = QWebView()
        self.view.page().mainFrame().setScrollBarPolicy(Qt.Vertical,
                                                        Qt.ScrollBarAlwaysOff)
        self.view.page().action(QWebPage.Reload).setVisible(False)
        self.view.setMaximumHeight(0)
        self.view.setUrl('qrc:/web/page.html')
        self.view.setZoomFactor(2)
        self.view.page().mainFrame().contentsSizeChanged.connect(
            self._resize_view)
        # For debugging JS:
        ## from PySide.QtWebKit import QWebSettings
        ## QWebSettings.globalSettings().setAttribute(
        ##     QWebSettings.DeveloperExtrasEnabled, True)

        button_image = QPushButton('Copy as Image')
        button_image.clicked.connect(self.set_clipboard_image)
        button_image.setToolTip('Then paste into any graphics program')
        button_word = QPushButton('Copy as MS Word Equation')
        button_word.clicked.connect(self.set_clipboard_word)
        button_html = QPushButton('Copy as Formatted Text')
        button_html.clicked.connect(self.set_clipboard_html)
        line = QFrame()
        line.setFrameShape(QFrame.HLine)
        line.setFrameShadow(QFrame.Sunken)

        button_layout = QHBoxLayout()
        button_layout.addStretch()
        button_layout.addWidget(button_image)
        button_layout.addWidget(button_word)
        button_layout.addWidget(button_html)
        source_layout = QHBoxLayout()
        source_layout.addWidget(self.compiler_view)
        source_layout.addWidget(self.stacked_widget, 1)
        QVBoxLayout(window)
        window.layout().addWidget(self.edit)
        window.layout().addWidget(self.view)
        window.layout().addLayout(button_layout)
        window.layout().addWidget(line)
        window.layout().addLayout(source_layout, 1)

        window.show()
        window.resize(window.minimumWidth(), window.height())
        # To prevent garbage collection of internal Qt object.
        self._window = window
開發者ID:spamalot,項目名稱:quichem,代碼行數:58,代碼來源:pyside.py

示例5: create_separator

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
    def create_separator(self, parent, is_vertical=True):
        """ Returns an adapted separator line control.
        """
        control = QFrame()
        control.setFrameShadow(QFrame.Sunken)

        if is_vertical:
            control.setFrameShape(QFrame.VLine)
            control.setMinimumWidth(5)
        else:
            control.setFrameShape(QFrame.HLine)
            control.setMinimumHeight(5)

        return control_adapter_for(control)
開發者ID:davidmorrill,項目名稱:facets,代碼行數:16,代碼來源:toolkit.py

示例6: add_separator

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
    def add_separator ( self, parent ):
        """ Adds a separator to the layout.
        """
        control = QFrame()
        control.setFrameShadow( QFrame.Sunken )

        if self.is_vertical or (self.columns > 0):
            control.setFrameShape( QFrame.HLine )
            control.setMinimumHeight( 5 )
        else:
            control.setFrameShape( QFrame.VLine )
            control.setMinimumWidth( 5 )

        if self.columns > 0:
            self.layout.addWidget( control, self._row, 0, 1, self.columns )
            self._row += 1
        else:
            self.layout.addWidget( control )
開發者ID:davidmorrill,項目名稱:facets,代碼行數:20,代碼來源:layout.py

示例7: __init__

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
    def __init__(self, options, parent=None):
        _OptionsWizardPage.__init__(self, options, parent=parent)
        self.setTitle("Conversion warnings")

        # Widgets
        self._lbl_count = SimulationCountLabel()
        self._lbl_count.setAlignment(Qt.AlignCenter)

        # Layouts
        layout = self.layout()

        frm_line = QFrame()
        frm_line.setFrameStyle(QFrame.HLine)
        frm_line.setFrameShadow(QFrame.Sunken)
        layout.addWidget(frm_line)

        sublayout = QHBoxLayout()
        sublayout.setContentsMargins(10, 0, 10, 0)
        sublayout.addWidget(self._lbl_count)
        layout.addLayout(sublayout)
開發者ID:pymontecarlo,項目名稱:pymontecarlo-gui,代碼行數:22,代碼來源:warning.py

示例8: __init__

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
    def __init__(self, options, parent=None):
        _OptionsWizardPage.__init__(self, options, parent)

        # Widgets
        self._lbl_count = SimulationCountLabel()
        self._lbl_count.setAlignment(Qt.AlignCenter)
        self._lbl_count.setValue(1)

        # Layouts
        layout = self.layout()

        frm_line = QFrame()
        frm_line.setFrameStyle(QFrame.HLine)
        frm_line.setFrameShadow(QFrame.Sunken)
        layout.addWidget(frm_line)

        sublayout = QHBoxLayout()
        sublayout.setContentsMargins(10, 0, 10, 0)
        sublayout.addWidget(self._lbl_count)
        layout.addLayout(sublayout)

        # Signals
        self.valueChanged.connect(self._onChanged)
開發者ID:pymontecarlo,項目名稱:pymontecarlo-gui,代碼行數:25,代碼來源:options.py

示例9: View

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
class View(QWidget):
    """Base `View` class. Defines behavior common in all views"""
    # Selecting a good font family for each platform
    osname = platform.system()
    if osname == 'Windows':
        fontFamily = 'Segoe UI'
    elif osname == 'Linux':
        fontFamily = ''
    else:
        fontFamily = ''
    
    
    def __init__(self, parent=None):
        """
        Init method. Initializes parent classes
        
        :param parent: Reference to a `QWidget` object to be used as parent 
        """
        
        super(View, self).__init__(parent)
        
    @staticmethod
    def labelsFont():
        """Returns the `QFont` that `QLabels` should use"""   
        
        return View.font(True)
        
    @staticmethod
    def editsFont():
        """Returns the `QFont` that `QLineEdits` should use"""
        
        return View.font(False)
        
    @staticmethod
    def font(bold):
        """
        Returns a `QFont` object to be used in `View` derived classes.
        
        :param bold: Indicates whether or not the font will be bold
        """
        
        font = QFont(View.fontFamily, 9, 50, False)
        font.setBold(bold)
        
        return font
        
    def setLogo(self):
        """Sets the company logo in the same place in all views"""
        
        logoPixmap = QPixmap(':/resources/logo.png')
        self.iconLabel = QLabel(self)
        self.iconLabel.setPixmap(logoPixmap)
        self.iconLabel.setGeometry(20, 20, logoPixmap.width(), logoPixmap.height())
        
        self.linkLabel = QLabel(self)
        self.linkLabel.setText(
                """<font size="1"><a href="http://www.iqstorage.com/fromiqbox.php">
                Developed at IQ Storage FTP Hosing Services</a></font>""")
        self.linkLabel.setOpenExternalLinks(True)
        # Defines a visual line separator to be placed under the `logoPixmap` `QLabel`
        self.line = QFrame()
        self.line.setFrameShape(QFrame.HLine);
        self.line.setFrameShadow(QFrame.Sunken);
開發者ID:ShareByLink,項目名稱:iqbox-ftp,代碼行數:65,代碼來源:views.py

示例10: HLine

# 需要導入模塊: from PySide.QtGui import QFrame [as 別名]
# 或者: from PySide.QtGui.QFrame import setFrameShadow [as 別名]
 def HLine(self):        
     from PySide.QtGui import QFrame
     toto = QFrame()
     toto.setFrameShape(QFrame.HLine)
     toto.setFrameShadow(QFrame.Sunken)
     return toto        
開發者ID:Skylion007,項目名稱:LVDOWin,代碼行數:8,代碼來源:GUI.py


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