python类QLabel()的实例源码

renamewindow.py 文件源码 项目:DroidWatcher 作者: suemi994 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, parent=None, win=None, element="", info=()):
        super(RenameDialog, self).__init__(parent)

        self.sourceWin = parent
        self.info = info
        self.element = element
        title = "Rename: " + element
        self.setWindowTitle(title)

        layout = QtGui.QGridLayout()
        question = QtGui.QLabel("Please enter new name:")
        layout.addWidget(question, 0, 0)
        self.lineEdit = QtGui.QLineEdit()
        layout.addWidget(self.lineEdit, 0, 1)
        self.buttonOK = QtGui.QPushButton("OK", self)
        layout.addWidget(self.buttonOK, 1, 1)
        self.buttonCancel = QtGui.QPushButton("Cancel", self)
        layout.addWidget(self.buttonCancel, 1, 0)

        self.lineEdit.setText(self.element)

        self.setLayout(layout)

        self.buttonCancel.clicked.connect(self.cancelClicked)
        self.buttonOK.clicked.connect(self.okClicked)
onionSkinRendererObjectWidget.py 文件源码 项目:onionSkinRenderer 作者: Viele 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def setupUi(self, onionSkinObject_layout):
        onionSkinObject_layout.setObjectName("onionSkinObject_layout")
        onionSkinObject_layout.resize(204, 38)
        self.horizontalLayout = QtGui.QHBoxLayout(onionSkinObject_layout)
        self.horizontalLayout.setSpacing(3)
        self.horizontalLayout.setContentsMargins(4, 2, 4, 2)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.object_label = QtGui.QLabel(onionSkinObject_layout)
        self.object_label.setObjectName("object_label")
        self.horizontalLayout.addWidget(self.object_label)
        self.object_remove_btn = QtGui.QPushButton(onionSkinObject_layout)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.object_remove_btn.sizePolicy().hasHeightForWidth())
        self.object_remove_btn.setSizePolicy(sizePolicy)
        self.object_remove_btn.setMinimumSize(QtCore.QSize(16, 16))
        self.object_remove_btn.setMaximumSize(QtCore.QSize(16, 16))
        self.object_remove_btn.setObjectName("object_remove_btn")
        self.horizontalLayout.addWidget(self.object_remove_btn)

        self.retranslateUi(onionSkinObject_layout)
        QtCore.QMetaObject.connectSlotsByName(onionSkinObject_layout)
keyboard_base.py 文件源码 项目:ShortcutEditorNuke 作者: Ahuge 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def build_ui(self):

        grid = QtGui.QGridLayout()
        grid.setVerticalSpacing(1)
        grid.setHorizontalSpacing(2)
        scale = 2
        for row_num, line in enumerate(self.keyboard_grid):
            col_index = 0
            for letter, width, button_type in line:
                key = button_type(letter)
                key.KEY_CLICKED.connect(self.button_press)
                if letter == "":
                    key = QtGui.QLabel("")
                grid.addWidget(key, row_num, col_index, 1, width * scale)
                col_index += width * scale
                if letter not in self.key_map:
                    self.key_map[letter] = []
                self.key_map[letter].append(weakref.ref(key))

        self.setLayout(grid)
        self.setWindowTitle('Calculator')
        self.resize(650, 200)
Manual.py 文件源码 项目:BioNanoAnalyst 作者: AppliedBioinformatics 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def setupUi(self, Manual):
        Manual.setObjectName(_fromUtf8("Manual"))
        Manual.resize(740, 450)
        Manual.setMinimumSize(QtCore.QSize(740, 450))
        Manual.setMaximumSize(QtCore.QSize(740, 450))
        self.textBrowser = QtGui.QTextBrowser(Manual)
        self.textBrowser.setGeometry(QtCore.QRect(10, 40, 721, 371))
        self.textBrowser.setObjectName(_fromUtf8("textBrowser"))
        self.label = QtGui.QLabel(Manual)
        self.label.setGeometry(QtCore.QRect(10, 10, 271, 21))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        self.manual_bn = QtGui.QPushButton(Manual)
        self.manual_bn.setGeometry(QtCore.QRect(650, 420, 75, 23))
        font = QtGui.QFont()
        font.setFamily(_fromUtf8("Arial"))
        self.manual_bn.setFont(font)
        self.manual_bn.setObjectName(_fromUtf8("manual_bn"))

        self.retranslateUi(Manual)
        QtCore.QMetaObject.connectSlotsByName(Manual)
FlowchartTemplate_pyside.py 文件源码 项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(529, 329)
        self.selInfoWidget = QtGui.QWidget(Form)
        self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222))
        self.selInfoWidget.setObjectName("selInfoWidget")
        self.gridLayout = QtGui.QGridLayout(self.selInfoWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.selDescLabel = QtGui.QLabel(self.selInfoWidget)
        self.selDescLabel.setText("")
        self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
        self.selDescLabel.setWordWrap(True)
        self.selDescLabel.setObjectName("selDescLabel")
        self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1)
        self.selNameLabel = QtGui.QLabel(self.selInfoWidget)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.selNameLabel.setFont(font)
        self.selNameLabel.setText("")
        self.selNameLabel.setObjectName("selNameLabel")
        self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1)
        self.selectedTree = DataTreeWidget(self.selInfoWidget)
        self.selectedTree.setObjectName("selectedTree")
        self.selectedTree.headerItem().setText(0, "1")
        self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2)
        self.hoverText = QtGui.QTextEdit(Form)
        self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81))
        self.hoverText.setObjectName("hoverText")
        self.view = FlowchartGraphicsView(Form)
        self.view.setGeometry(QtCore.QRect(0, 0, 256, 192))
        self.view.setObjectName("view")

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
exportDialogTemplate_pyside.py 文件源码 项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(241, 367)
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 3)
        self.itemTree = QtGui.QTreeWidget(Form)
        self.itemTree.setObjectName("itemTree")
        self.itemTree.headerItem().setText(0, "1")
        self.itemTree.header().setVisible(False)
        self.gridLayout.addWidget(self.itemTree, 1, 0, 1, 3)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 3)
        self.formatList = QtGui.QListWidget(Form)
        self.formatList.setObjectName("formatList")
        self.gridLayout.addWidget(self.formatList, 3, 0, 1, 3)
        self.exportBtn = QtGui.QPushButton(Form)
        self.exportBtn.setObjectName("exportBtn")
        self.gridLayout.addWidget(self.exportBtn, 6, 1, 1, 1)
        self.closeBtn = QtGui.QPushButton(Form)
        self.closeBtn.setObjectName("closeBtn")
        self.gridLayout.addWidget(self.closeBtn, 6, 2, 1, 1)
        self.paramTree = ParameterTree(Form)
        self.paramTree.setObjectName("paramTree")
        self.paramTree.headerItem().setText(0, "1")
        self.paramTree.header().setVisible(False)
        self.gridLayout.addWidget(self.paramTree, 5, 0, 1, 3)
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 4, 0, 1, 3)
        self.copyBtn = QtGui.QPushButton(Form)
        self.copyBtn.setObjectName("copyBtn")
        self.gridLayout.addWidget(self.copyBtn, 6, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
TransformGuiTemplate_pyside.py 文件源码 项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(224, 117)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setSpacing(1)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.translateLabel = QtGui.QLabel(Form)
        self.translateLabel.setObjectName("translateLabel")
        self.verticalLayout.addWidget(self.translateLabel)
        self.rotateLabel = QtGui.QLabel(Form)
        self.rotateLabel.setObjectName("rotateLabel")
        self.verticalLayout.addWidget(self.rotateLabel)
        self.scaleLabel = QtGui.QLabel(Form)
        self.scaleLabel.setObjectName("scaleLabel")
        self.verticalLayout.addWidget(self.scaleLabel)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.mirrorImageBtn = QtGui.QPushButton(Form)
        self.mirrorImageBtn.setToolTip("")
        self.mirrorImageBtn.setObjectName("mirrorImageBtn")
        self.horizontalLayout.addWidget(self.mirrorImageBtn)
        self.reflectImageBtn = QtGui.QPushButton(Form)
        self.reflectImageBtn.setObjectName("reflectImageBtn")
        self.horizontalLayout.addWidget(self.reflectImageBtn)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
FlowchartTemplate_pyside.py 文件源码 项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(529, 329)
        self.selInfoWidget = QtGui.QWidget(Form)
        self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222))
        self.selInfoWidget.setObjectName("selInfoWidget")
        self.gridLayout = QtGui.QGridLayout(self.selInfoWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.selDescLabel = QtGui.QLabel(self.selInfoWidget)
        self.selDescLabel.setText("")
        self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
        self.selDescLabel.setWordWrap(True)
        self.selDescLabel.setObjectName("selDescLabel")
        self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1)
        self.selNameLabel = QtGui.QLabel(self.selInfoWidget)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.selNameLabel.setFont(font)
        self.selNameLabel.setText("")
        self.selNameLabel.setObjectName("selNameLabel")
        self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1)
        self.selectedTree = DataTreeWidget(self.selInfoWidget)
        self.selectedTree.setObjectName("selectedTree")
        self.selectedTree.headerItem().setText(0, "1")
        self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2)
        self.hoverText = QtGui.QTextEdit(Form)
        self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81))
        self.hoverText.setObjectName("hoverText")
        self.view = FlowchartGraphicsView(Form)
        self.view.setGeometry(QtCore.QRect(0, 0, 256, 192))
        self.view.setObjectName("view")

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
exportDialogTemplate_pyside.py 文件源码 项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(241, 367)
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 3)
        self.itemTree = QtGui.QTreeWidget(Form)
        self.itemTree.setObjectName("itemTree")
        self.itemTree.headerItem().setText(0, "1")
        self.itemTree.header().setVisible(False)
        self.gridLayout.addWidget(self.itemTree, 1, 0, 1, 3)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 3)
        self.formatList = QtGui.QListWidget(Form)
        self.formatList.setObjectName("formatList")
        self.gridLayout.addWidget(self.formatList, 3, 0, 1, 3)
        self.exportBtn = QtGui.QPushButton(Form)
        self.exportBtn.setObjectName("exportBtn")
        self.gridLayout.addWidget(self.exportBtn, 6, 1, 1, 1)
        self.closeBtn = QtGui.QPushButton(Form)
        self.closeBtn.setObjectName("closeBtn")
        self.gridLayout.addWidget(self.closeBtn, 6, 2, 1, 1)
        self.paramTree = ParameterTree(Form)
        self.paramTree.setObjectName("paramTree")
        self.paramTree.headerItem().setText(0, "1")
        self.paramTree.header().setVisible(False)
        self.gridLayout.addWidget(self.paramTree, 5, 0, 1, 3)
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 4, 0, 1, 3)
        self.copyBtn = QtGui.QPushButton(Form)
        self.copyBtn.setObjectName("copyBtn")
        self.gridLayout.addWidget(self.copyBtn, 6, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
TransformGuiTemplate_pyside.py 文件源码 项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(224, 117)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setSpacing(1)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.translateLabel = QtGui.QLabel(Form)
        self.translateLabel.setObjectName("translateLabel")
        self.verticalLayout.addWidget(self.translateLabel)
        self.rotateLabel = QtGui.QLabel(Form)
        self.rotateLabel.setObjectName("rotateLabel")
        self.verticalLayout.addWidget(self.rotateLabel)
        self.scaleLabel = QtGui.QLabel(Form)
        self.scaleLabel.setObjectName("scaleLabel")
        self.verticalLayout.addWidget(self.scaleLabel)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.mirrorImageBtn = QtGui.QPushButton(Form)
        self.mirrorImageBtn.setToolTip("")
        self.mirrorImageBtn.setObjectName("mirrorImageBtn")
        self.horizontalLayout.addWidget(self.mirrorImageBtn)
        self.reflectImageBtn = QtGui.QPushButton(Form)
        self.reflectImageBtn.setObjectName("reflectImageBtn")
        self.horizontalLayout.addWidget(self.reflectImageBtn)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
design.py 文件源码 项目:TWTools 作者: ZeX2 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def setupUi(self):
        """Bruh"""
        self.setGeometry(50, 50, 450, 250)
        self.setWindowTitle("ZeZe's TWTools - Updating Servers")
        self.setWindowIcon(QtGui.QIcon(resource_path("images/icon.png")))

        """Background color"""
        self.backgroundPalette = QtGui.QPalette()
        self.backgroundColor = QtGui.QColor(217, 204, 170)
        self.backgroundPalette.setColor(QtGui.QPalette.Background, self.backgroundColor)
        self.setPalette(self.backgroundPalette)

        """Layout"""
        self.verticalLayout = QtGui.QVBoxLayout(self)

        self.text = QtGui.QLabel("Updating server list:")
        self.verticalLayout.addWidget(self.text)

        """Download bar"""
        self.progress_bar = QtGui.QProgressBar(self)
        self.progress_bar.setMinimum(0)
        self.progress_bar.setMaximum(27)
        self.progress_bar.setValue(0)
        self.progress_bar.setFormat("%v / %m")
        self.verticalLayout.addWidget(self.progress_bar)

        """Text browser for progress"""
        self.progress_text = QtGui.QTextBrowser(self)
        self.verticalLayout.addWidget(self.progress_text)

        """Button"""
        self.horizontalLayout = QtGui.QHBoxLayout(self)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.Spacer = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(self.Spacer)

        self.cancelButton = QtGui.QPushButton("Cancel")
        self.horizontalLayout.addWidget(self.cancelButton)
        self.cancelButton.clicked.connect(self.cancel_function)
perspective_trafo.py 文件源码 项目:reconstruction 作者: microelly2 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def runwid(text):
    w=QtGui.QWidget()
    w.setStyleSheet("QLabel { color: rgb(255, 0, 0); font-size: 20px; background-color: rgba(255, 255, 100, 100); border: 1px solid rgba(188, 188, 188, 250); }")
    w.setGeometry(800, 400, 10, 10)

    box = QtGui.QVBoxLayout()
    w.setLayout(box)
    w.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)

    l=QtGui.QLabel(text)
    box.addWidget(l)
    return w
perspective_trafo.py 文件源码 项目:reconstruction 作者: microelly2 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def dialog(fn):

    w=QtGui.QWidget()

    box = QtGui.QVBoxLayout()
    w.setLayout(box)
    w.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)

    l=QtGui.QLabel("Path to Image" )
    box.addWidget(l)
    w.anz = QtGui.QLineEdit()
    w.anz.setText(fn)
    box.addWidget(w.anz)

    loff=QtGui.QLabel("Offset Border" )
    box.addWidget(loff)
    w.off = QtGui.QLineEdit()
    w.off.setText("100")
    box.addWidget(w.off)

    w.rotpos=QtGui.QCheckBox("Rot +90")
    box.addWidget(w.rotpos)

    w.rotneg=QtGui.QCheckBox("Rot -90")
    box.addWidget(w.rotneg)

    w.rot180=QtGui.QCheckBox("Rot 180")
    box.addWidget(w.rot180)



    w.r=QtGui.QPushButton("run")
    box.addWidget(w.r)
    w.r.pressed.connect(lambda :runw(w))

    w.show()
    return w
CV.py 文件源码 项目:reconstruction 作者: microelly2 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def __init__(self, dialer,obj,menu,noclose,*args):
        QtGui.QWidget.__init__(self, *args)
        obj.widget=self
        self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
        self.vollabel =QtGui.QLabel( "<b>"+obj.Object.Label+"</b>") 

        if dialer:
            dial = QtGui.QDial()
            dial.setNotchesVisible(True)
            self.dial=dial
            dial.setMaximum(100)
            dial.valueChanged.connect(obj.dialer);

        layout = QtGui.QVBoxLayout()
        layout.addWidget(self.vollabel)

        for m in menu:
            bt=QtGui.QPushButton(m[0])
            bt.clicked.connect(m[1])
            layout.addWidget(bt)

        if dialer:
            layout.addWidget(dial)

        if not noclose:
            self.pushButton02 = QtGui.QPushButton("close")
            self.pushButton02.clicked.connect(self.hide)
            layout.addWidget(self.pushButton02)

        self.setLayout(layout)
        try:
            self.setWindowTitle(obj.Object.target.Label)
        except:
            pass
miki.py 文件源码 项目:reconstruction 作者: microelly2 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def testme():

    layout='''
    VerticalLayoutTab:
        id:'main'
        QtGui.QLabel:
            setText:"***   N U R B S     E D I T O R   ***"
        VerticalLayout:
            HorizontalLayout:
                QtGui.QLabel:
                    setText: "huhuwas 1 3"
                QtGui.QLabel:
                    setText: "huhuwas 2 3"
                QtGui.QLabel:
                    setText: "huhuwas 3 3"
            HorizontalLayout:
                QtGui.QLabel:
                    setText:"Action "
                QtGui.QPushButton:
                    setText: "Run Action"
                VerticalLayout:
                    QtGui.QLineEdit:
                        setText:"edit Axample"
                    QtGui.QLineEdit:
                        setText:"edit B"
                QtGui.QLineEdit:
                    setText:"horizel "
        HorizontalLayout:
            QtGui.QLineEdit:
                setText:"AA"
            QtGui.QLineEdit:
                setText:"BB"

    '''


    miki=Miki()
    #app.root=miki

    miki.parse2(layout)
    miki.run(layout)
GDT.py 文件源码 项目:FreeCAD-GDT 作者: juanvanyo 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def GDTDialog_hbox( label, inputWidget):
    hbox = QtGui.QHBoxLayout()
    hbox.addWidget( QtGui.QLabel(label) )
    if inputWidget <> None:
        hbox.addStretch(1)
        hbox.addWidget(inputWidget)
    return hbox
type_widget_ui.py 文件源码 项目:CyclopsVFX-Unity 作者: geoffroygivry 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def setupUi(self, type_widget):
        type_widget.setObjectName("type_widget")
        type_widget.resize(248, 78)
        self.horizontalLayout_2 = QtGui.QHBoxLayout(type_widget)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.type_icon = QtGui.QLabel(type_widget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.type_icon.sizePolicy().hasHeightForWidth())
        self.type_icon.setSizePolicy(sizePolicy)
        self.type_icon.setObjectName("type_icon")
        self.horizontalLayout_2.addWidget(self.type_icon)
        spacerItem = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem)
        self.line = QtGui.QFrame(type_widget)
        self.line.setFrameShape(QtGui.QFrame.VLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName("line")
        self.horizontalLayout_2.addWidget(self.line)
        spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem1)
        self.type_label = QtGui.QLabel(type_widget)
        font = QtGui.QFont()
        font.setFamily("Cantarell")
        font.setPointSize(10)
        font.setWeight(75)
        font.setBold(True)
        self.type_label.setFont(font)
        self.type_label.setObjectName("type_label")
        self.horizontalLayout_2.addWidget(self.type_label)

        self.retranslateUi(type_widget)
        QtCore.QMetaObject.connectSlotsByName(type_widget)
ToDoList.py 文件源码 项目:CyclopsVFX-Unity 作者: geoffroygivry 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def setupUI(self):
        mainLayout = QtGui.QVBoxLayout()
        self.setLayout(mainLayout)
        self.buttonLayout = QtGui.QHBoxLayout()
        self.msg = QtGui.QLabel()

        self.addTaskButton = QtGui.QPushButton('Add Task')
        self.addTaskButton.setToolTip('Add a new task to the list')
        self.sortButton = QtGui.QPushButton('Reverse Sorting')
        self.sortButton.setCheckable(True)
        self.sortButton.setToolTip('Push to sort so highest priorities are at the top,\notherwise lowest will be at the top.')
        self.helpButton = QtGui.QPushButton('?')
        self.helpButton.setMaximumWidth(30)
        self.helpButton.setFlat(True)
        self.helpButton.setToolTip(self.__helpText())
        self.hideButton = QtGui.QPushButton('Hide Finished Tasks')
        self.hideButton.setCheckable(True)
        self.hideButton.setToolTip('Hide finished tasks to keep the list tidy')      
        self.clipboardButton = QtGui.QPushButton('Copy To Clipboard')
        self.clipboardButton.setToolTip('Push to copy current task info to cliboard for pasting into emails or other text documents.\nHandy to keep those coordinators happy.')

        self.buttonLayout.addWidget(self.addTaskButton)
        self.buttonLayout.addWidget(self.sortButton)
        self.buttonLayout.addWidget(self.hideButton)
        self.buttonLayout.addWidget(self.clipboardButton)
        self.buttonLayout.addSpacing(20)
        self.buttonLayout.addWidget(self.helpButton)

        self.layout().addWidget(self.msg)
        self.layout().addLayout(self.buttonLayout)

        self.taskContainer = QtGui.QWidget()
        self.scrollArea = QtGui.QScrollArea()
        self.scrollArea.setWidget(self.taskContainer)
        self.layout().addWidget(self.scrollArea)
        self.createTaskWidgets()
        self.update()
pyi_interact_pyside.py 文件源码 项目:driveboardapp 作者: nortd 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self):
        super(MyDialog, self).__init__()

        self.label = QtGui.QLabel(
            u'Press <ESC> to exit. Some non-ascii chars: ??š?íá?'
            u'\nor wait some seconds',
            self)
        self.setWindowTitle('Hello World from PySide')
        self.resize(400, 200)
        self.show()

        # close window after 1.5 seconds
        QtCore.QTimer.singleShot(1500, self.close)
slice_viewer.py 文件源码 项目:BrainModulyzer 作者: sugeerth 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self, templateData, parcelationData, axis, correlationTable, colorTable, selectedColor):
        super(SliceViewer, self).__init__()

        self.template = templateData
        self.regionId = None
        self.parcelation = parcelationData
        self.axis = axis
        self.CommunityMode = False
        self.correlationTable = correlationTable
        self.colorTable= colorTable
        self.selectedColor = selectedColor
        self.displayedSlice = 0
        self.QImage = []
        scalefactor = 350
        self.scaleFactor = int(math.ceil(scalefactor / self.parcelation.shape[0]))

        numColors = self.parcelation.max()
        self.clut = np.zeros(numColors, dtype=np.uint32)

        for i in range(numColors):
            r, g, b = colorsys.hls_to_rgb(float(i) / float(numColors), 0.5, 1.0)
            self.clut[i] = (255 << 24 | int(255*r) << 16 | int(255*g) << 8 | int(255*b))

        slice_view_layout = QtGui.QHBoxLayout()
        self.setLayout(slice_view_layout)

        slider = QtGui.QSlider()
        slider.setRange(0, self.template.shape[self.axis]-1)
        slider.valueChanged.connect(self.setDisplayedSlice)
        slider.sliderReleased.connect(self.handleSliderRelease)
        slider.setValue(self.displayedSlice)
        slice_view_layout.addWidget(slider)

        self.label = QtGui.QLabel()
        self.updateSliceLabel()
        slice_view_layout.addWidget(self.label)


问题


面经


文章

微信
公众号

扫码关注公众号