python类QHBoxLayout()的实例源码

pmonitor.py 文件源码 项目:PH5 作者: PIC-IRIS 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def __init__ (self, title, mmax=100) :
        super (FamilyProgress, self).__init__ ()

        self.setWindowTitle (title)
        self.setFixedHeight (48)
        self.pbar = QtGui.QProgressBar ()
        self.pbar.setRange (0, mmax - 1)

        self.btn = QtGui.QPushButton ("Starting", self)

        pbarvbox = QtGui.QVBoxLayout()
        pbarvbox.addStretch (False)
        pbarvbox.addWidget (self.pbar)
        buttonvbox = QtGui.QVBoxLayout ()
        buttonvbox.addStretch (True)
        buttonvbox.addWidget (self.btn)
        hbox = QtGui.QHBoxLayout ()
        hbox.addLayout(pbarvbox, stretch=False)
        hbox.addLayout(buttonvbox)

        self.setLayout (hbox)
        self.pbar.setStyleSheet(START_STYLE)        
        #self.show()
design.py 文件源码 项目:TWTools 作者: ZeX2 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def setupUi(self):
        """Bruh"""
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        self.setGeometry(50, 50, 600, 300)
        self.setWindowTitle("ZeZe's TWTools - Backtiming Calculator")
        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)

        """Main layout & return to main menu button"""
        self.verticalLayout = QtGui.QVBoxLayout(self)

        self.buttonLayout = QtGui.QHBoxLayout(self)
        self.verticalLayout.addLayout(self.buttonLayout)
        self.returnButton = QtGui.QPushButton("  Return to the Main Menu  ", self)
        self.returnButton.clicked.connect(self.return_function)
        self.buttonLayout.addWidget(self.returnButton)
        self.buttonSpacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.buttonLayout.addItem(self.buttonSpacer)
miki.py 文件源码 项目:reconstruction 作者: microelly2 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def  fh(name="horizontal",title=''):
    w=QtGui.QWidget()
    #w.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)

### w.setStyleSheet("QWidget { font: bold 18px;color:blue;border-style: outset;border-width: 3px;border-radius: 10px;border-color: blue;}")
    layout = QtGui.QHBoxLayout()
    layout.setAlignment(QtCore.Qt.AlignLeft)
    w.setLayout(layout)
    # Gruppenname setzen:
    #pB= QtGui.QLabel("name")
    #pB.setStyleSheet("QWidget { font: bold 18px;color:red;border-style: outset;border-width: 3px;border-radius: 10px;border-color: blue;}")
    #layout.addWidget(pB)

    if title <>'': w.setWindowTitle(title)
    #w.show()
    #ComboViewShowWidget(w,False)
    w.layout=layout
    return w
GDT.py 文件源码 项目:FreeCAD-GDT 作者: juanvanyo 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def initUI(self, title, idGDT, ContainerOfData):
        self.idGDT = idGDT
        self.ContainerOfData = ContainerOfData
        vbox = QtGui.QVBoxLayout()
        for widg in self.dd_dialogWidgets:
            if widg <> None:
                w = widg.generateWidget(self.idGDT,self.ContainerOfData)
                if isinstance(w, QtGui.QLayout):
                    vbox.addLayout( w )
                else:
                    vbox.addWidget( w )
        hbox = QtGui.QHBoxLayout()
        buttonCreate = QtGui.QPushButton(title)
        buttonCreate.setDefault(True)
        buttonCreate.clicked.connect(self.createObject)
        hbox.addStretch(1)
        hbox.addWidget( buttonCreate )
        hbox.addStretch(1)
        vbox.addLayout( hbox )
        self.setLayout(vbox)
razen.py 文件源码 项目:FreeCAD-PCB 作者: marmni 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, filename=None, parent=None):
        dialogMAIN_FORM.__init__(self, parent)
        self.databaseType = "razen"

        ###
        self.generateLayers()
        self.spisWarstw.sortItems(1)
        #
        self.razenBiblioteki = QtGui.QLineEdit('')
        if PCBconf.supSoftware[self.databaseType]['libPath'] != "":
            self.razenBiblioteki.setText(PCBconf.supSoftware[self.databaseType]['libPath'])

        lay = QtGui.QHBoxLayout()
        lay.addWidget(QtGui.QLabel('Library'))
        lay.addWidget(self.razenBiblioteki)
        self.lay.addLayout(lay, 12, 0, 1, 6)
fidocadj.py 文件源码 项目:FreeCAD-PCB 作者: marmni 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, filename=None, parent=None):
        dialogMAIN_FORM.__init__(self, parent)
        self.databaseType = "fidocadj"

        self.projektBRD = __builtin__.open(filename, "r").read().replace("\r", "")
        self.layersNames = {}
        self.getLayersNames()
        ####
        self.generateLayers()
        self.spisWarstw.sortItems(1)
        #
        self.fidocadjBiblioteki = QtGui.QLineEdit('')
        if PCBconf.supSoftware[self.databaseType]['libPath'] != "":
            self.fidocadjBiblioteki.setText(PCBconf.supSoftware[self.databaseType]['libPath'])

        lay = QtGui.QHBoxLayout()
        lay.addWidget(QtGui.QLabel('Library'))
        lay.addWidget(self.fidocadjBiblioteki)
        self.lay.addLayout(lay, 12, 0, 1, 6)
ElectrodeInterface.py 文件源码 项目:ECoG-ClusterFlow 作者: sugeerth 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def MaintainLayout(self):
        self.InterfaceWidget =QtGui.QWidget()
        self.InterfaceWidget.setContentsMargins(0, 0, 0, 0)
        self.InterfaceLayout = QtGui.QVBoxLayout()
        ConsensusPlot = QtGui.QHBoxLayout()
# 
        self.InterfaceLayout.setContentsMargins(0, 0, 0, 0)
        # self.communitiesAcrossTimeStep.PlotWidget.setMinimumSize(200,100)
        # self.communitiesAcrossTimeStep.PlotWidget.setMaximumSize(200,100)

        # ConsensusPlot.addWidget(self.communitiesAcrossTimeStep.PlotWidget)
        self.InterfaceLayout.addWidget(self.Visualizer.MainTab)
        self.InterfaceLayout.setContentsMargins(0, 0, 0, 0)

        self.InterfaceLayout.addLayout(ConsensusPlot)
        self.InterfaceLayout.setContentsMargins(0, 0, 0, 0)

        self.InterfaceWidget.setContentsMargins(0, 0, 0, 0)
        self.InterfaceWidget.setLayout(self.InterfaceLayout)
        self.InterfaceWidget.setContentsMargins(0, 0, 0, 0)
        self.InterfaceWidget.show()

    # def connectCustomWebView(self, view):
    #   self.view = view
    #   self.Visualizer.SliceInterval.valueChanged[int].connect(self.view.slicesChanged)
main.py 文件源码 项目:Electrify 作者: jyapayne 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def create_setting(self, name):
        setting = self.get_setting(name)
        if setting.type == 'string':
            return self.create_text_input_setting(name)
        elif setting.type == 'strings':
            return self.create_text_input_setting(name)
        elif setting.type == 'file':
            return self.create_text_input_with_file_setting(name)
        elif setting.type == 'folder':
            return self.create_text_input_with_folder_setting(name)
        elif setting.type == 'check':
            return self.create_check_setting(name)
        elif setting.type == 'list':
            return self.create_list_setting(name)
        elif setting.type == 'range':
            return self.create_range_setting(name)
        elif setting.type == 'color':
            return self.create_color_setting(name)
        else:
            print('Setting "{}" type "{}" not defined.'.format(name, setting.type))
            return QtGui.QHBoxLayout()
main.py 文件源码 项目:Electrify 作者: jyapayne 项目源码 文件源码 阅读 85 收藏 0 点赞 0 评论 0
def create_check_setting(self, name):
        hlayout = QtGui.QHBoxLayout()

        setting = self.get_setting(name)

        check = QtGui.QCheckBox()

        check.setObjectName(setting.name)

        check.clicked.connect(self.call_with_object('setting_changed',
                                                    check, setting))
        check.setChecked(setting.value)
        check.setStatusTip(setting.description)
        check.setToolTip(setting.description)

        hlayout.addWidget(check)

        return hlayout
NodePanel.py 文件源码 项目:PipeLine 作者: draknova 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def createNodeMenu(self):
        menuEntry = QtGui.QGraphicsWidget()
        menuEntryLayout = QtGui.QHBoxLayout()
        menuEntry.setLayout(menuEntryLayout)

        menuEntry.setGeometry(0,0,100,100)

        menuEntryTextField = QtGui.QLineEdit()
        menuEntryLayout.addWidget(menuEntryTextField)


        menu = QtGui.QMenu("Create Node")
        menu.addAction("Node1")
        menu.addAction("Node2")
        menu.popup(QtGui.QCursor.pos())
        menu.setZValue(100000)
        print "Menu"
ParameterPanel.py 文件源码 项目:PipeLine 作者: draknova 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __init__(self):
        super(HeaderParameterPanel,self).__init__()

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

        self.nodeTypeLabel = QtGui.QLabel("<NodeDefaultType>")
        self.nodeNameField = QtGui.QLineEdit("<NodeDefaultName>")
        self.lockButton = QtGui.QPushButton("L")
        self.editInterfaceButton = QtGui.QPushButton("G")
        layout.addWidget(self.nodeTypeLabel)
        layout.addWidget(self.nodeNameField)
        layout.addWidget(self.lockButton)
        layout.addWidget(self.editInterfaceButton)



# This is the graphical aspect of the ParameterTemplate
interface.py 文件源码 项目:PipeLine 作者: draknova 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def initUI(self):
        self._layout = QtGui.QHBoxLayout()
        self.setLayout(self._layout)
        self._layout.setContentsMargins(10,0,10,10)
        self._layout.setSpacing(5)

        self._tabs = QtGui.QTabBar()
        #self._tabs.setTabsClosable(True)
        self._tabs.addTab("Tab1")
        self._tabs.addTab("Tab2")
        self._tabs.addTab("Tab3")

        icnPath = "/Users/draknova/Documents/workspace/sPipe/bin/images/icons"
        addIcone = QtGui.QIcon(QtGui.QPixmap("%s/add.png"%(icnPath)))
        panelIcone = QtGui.QIcon(QtGui.QPixmap("%s/list.png"%(icnPath)))

        self._addButton = QtGui.QPushButton(addIcone,"")

        self._panelButton = QtGui.QPushButton(panelIcone,"")

        self._layout.addWidget(self._tabs)
        self._layout.addWidget(self._addButton)
        self._layout.addStretch()
        self._layout.addWidget(self._panelButton)
mainwidget.py 文件源码 项目:qtinwin 作者: alfalfasprossen 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def __init__(self, *args,**kwargs):
        super(MainWidget, self).__init__(*args,**kwargs)
        self.setLayout(QtGui.QHBoxLayout())
        self.bkg_wdgt = QtGui.QWidget()
        self.layout().addWidget(self.bkg_wdgt)
        self.bkg_wdgt.setLayout(QtGui.QHBoxLayout())
        self.btn = QtGui.QPushButton("hallo")
        self.textarea = QtGui.QTextEdit()
        self.bkg_wdgt.layout().addWidget(self.btn)
        self.bkg_wdgt.layout().addWidget(self.textarea)

        self.setWindowFlags(QtCore.Qt.FramelessWindowHint)

        self.btn.clicked.connect(self.on_btn_clicked)

        # self.parent_hwnd = None
LNTextEdit.py 文件源码 项目:universal_tool_template.py 作者: shiningdesign 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def __init__(self, *args):
        QtWidgets.QFrame.__init__(self, *args)

        self.setFrameStyle(QtWidgets.QFrame.StyledPanel | QtWidgets.QFrame.Sunken)

        self.edit = self.PlainTextEdit()
        self.number_bar = self.NumberBar(self.edit)

        hbox = QtWidgets.QHBoxLayout(self)
        hbox.setSpacing(0)
        hbox.setContentsMargins(0,0,0,0) # setMargin
        hbox.addWidget(self.number_bar)
        hbox.addWidget(self.edit)

        self.edit.blockCountChanged.connect(self.number_bar.adjustWidth)
        self.edit.updateRequest.connect(self.number_bar.updateContents)
GearBox_template_1010.py 文件源码 项目:universal_tool_template.py 作者: shiningdesign 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def quickLayout(self, type, ui_name=""):
        the_layout = ''
        if type in ("form", "QFormLayout"):
            the_layout = QtWidgets.QFormLayout()
            the_layout.setLabelAlignment(QtCore.Qt.AlignLeft)
            the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)    
        elif type in ("grid", "QGridLayout"):
            the_layout = QtWidgets.QGridLayout()
        elif type in ("hbox", "QHBoxLayout"):
            the_layout = QtWidgets.QHBoxLayout()
            the_layout.setAlignment(QtCore.Qt.AlignTop)
        else:        
            the_layout = QtWidgets.QVBoxLayout()
            the_layout.setAlignment(QtCore.Qt.AlignTop)
        if ui_name != "":
            self.uiList[ui_name] = the_layout
        return the_layout
LNTextEdit_v3.2.py 文件源码 项目:universal_tool_template.py 作者: shiningdesign 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def __init__(self, *args):
        QtGui.QFrame.__init__(self, *args)

        self.setFrameStyle(QtGui.QFrame.StyledPanel | QtGui.QFrame.Sunken)

        self.edit = self.PlainTextEdit()
        self.number_bar = self.NumberBar(self.edit)

        hbox = QtGui.QHBoxLayout(self)
        hbox.setSpacing(0)
        hbox.setContentsMargins(0,0,0,0) # setMargin
        hbox.addWidget(self.number_bar)
        hbox.addWidget(self.edit)

        self.edit.blockCountChanged.connect(self.number_bar.adjustWidth)
        self.edit.updateRequest.connect(self.number_bar.updateContents)
gui.py 文件源码 项目:epycyzm 作者: slush0 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def createIconGroupBox(self):
        self.iconGroupBox = QtGui.QGroupBox("Tray Icon")

        self.iconLabel = QtGui.QLabel("Icon:")

        self.iconComboBox = QtGui.QComboBox()
        self.iconComboBox.addItem(QtGui.QIcon(':/icons/miner.svg'), "Miner")
        self.iconComboBox.addItem(QtGui.QIcon(':/images/heart.svg'), "Heart")
        self.iconComboBox.addItem(QtGui.QIcon(':/images/trash.svg'), "Trash")

        self.showIconCheckBox = QtGui.QCheckBox("Show icon")
        self.showIconCheckBox.setChecked(True)

        iconLayout = QtGui.QHBoxLayout()
        iconLayout.addWidget(self.iconLabel)
        iconLayout.addWidget(self.iconComboBox)
        iconLayout.addStretch()
        iconLayout.addWidget(self.showIconCheckBox)
        self.iconGroupBox.setLayout(iconLayout)
miki.py 文件源码 项目:freecad-nurbs 作者: microelly2 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def  fh(name="horizontal",title=''):
    w=QtGui.QWidget()
    #w.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)

### w.setStyleSheet("QWidget { font: bold 18px;color:blue;border-style: outset;border-width: 3px;border-radius: 10px;border-color: blue;}")
    layout = QtGui.QHBoxLayout()
    layout.setAlignment(QtCore.Qt.AlignLeft)
    w.setLayout(layout)
    # Gruppenname setzen:
    #pB= QtGui.QLabel("name")
    #pB.setStyleSheet("QWidget { font: bold 18px;color:red;border-style: outset;border-width: 3px;border-radius: 10px;border-color: blue;}")
    #layout.addWidget(pB)

    if title <>'': w.setWindowTitle(title)
    #w.show()
    #ComboViewShowWidget(w,False)
    w.layout=layout
    return w
crosspiece.py 文件源码 项目:LCInterlocking 作者: execuc 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def init_tree_widget(self):
        # Add part buttons
        h_box = QtGui.QHBoxLayout(self.tree_widget)
        add_parts_button = QtGui.QPushButton('Add parts', self.tree_widget)
        add_parts_button.clicked.connect(self.add_parts)
        add_same_part_button = QtGui.QPushButton('Add same parts', self.tree_widget)
        add_same_part_button.clicked.connect(self.add_same_parts)
        h_box.addWidget(add_parts_button)
        h_box.addWidget(add_same_part_button)
        self.tree_vbox.addLayout(h_box)
        # tree
        self.selection_model = self.tree_view_widget.selectionModel()
        self.selection_model.selectionChanged.connect(self.selection_changed)
        self.tree_vbox.addWidget(self.tree_view_widget)
        remove_item_button = QtGui.QPushButton('Remove item', self.tree_widget)
        remove_item_button.clicked.connect(self.remove_items)
        self.tree_vbox.addWidget(remove_item_button)
        # test layout
        self.edit_items_layout = QtGui.QVBoxLayout(self.tree_widget)
        self.tree_vbox.addLayout(self.edit_items_layout)
main.py 文件源码 项目:porn_sieve 作者: PornSieve 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def init_middle_pane(self):
        self.mid_pane = QtGui.QHBoxLayout()

        # IMGS: images which will display the video preview
        pixmap = QtGui.QPixmap("0.jpg")
        pixmap.scaledToWidth(self.preview_size)
        pixmap.scaledToHeight(self.preview_size)
        img_lbl = QtGui.QLabel(self)
        img_lbl.setPixmap(pixmap)

        # Make sure the window isn't constantly resizing
        img_lbl.setScaledContents(True)
        img_lbl.setMaximumWidth(self.preview_size)
        img_lbl.setMaximumHeight(self.preview_size)

        self.img = img_lbl
        self.mid_pane.addWidget(self.img)

        # SLIDER: slide to rate the quality of the video
        self.slider = QtGui.QSlider(self, QtCore.Qt.Vertical)
        self.slider.setTickPosition(QtGui.QSlider.TicksBothSides)
        self.slider.setTickInterval(20)
        self.mid_pane.addWidget(self.slider)

        self.layout.addLayout(self.mid_pane)
attTable_UIs.py 文件源码 项目:pw_mGeoExporter 作者: paulwinex 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(400, 300)
        self.horizontalLayout = QtGui.QHBoxLayout(Form)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.tableLayout = QtGui.QVBoxLayout()
        self.tableLayout.setObjectName("tableLayout")
        self.horizontalLayout.addLayout(self.tableLayout)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.addAttr_btn = QtGui.QPushButton(Form)
        self.addAttr_btn.setMaximumSize(QtCore.QSize(30, 16777215))
        self.addAttr_btn.setObjectName("addAttr_btn")
        self.verticalLayout.addWidget(self.addAttr_btn)
        self.removeAttr_btn = QtGui.QPushButton(Form)
        self.removeAttr_btn.setMaximumSize(QtCore.QSize(30, 16777215))
        self.removeAttr_btn.setObjectName("removeAttr_btn")
        self.verticalLayout.addWidget(self.removeAttr_btn)
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.horizontalLayout.setStretch(0, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
onionSkinRendererObjectWidget.py 文件源码 项目:onionSkinRenderer 作者: Viele 项目源码 文件源码 阅读 17 收藏 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)
main.py 文件源码 项目:sensor-gui 作者: Hackathon-Sanjurjo 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def splitter(self):

        self.vis_3d = Vis3D()
        self.vis_instrument = VisInstrument()
        self.vis_sensors = VisSensors()

        hbox = QtGui.QHBoxLayout(self)
        splitter1 = QtGui.QSplitter(QtCore.Qt.Horizontal)
        splitter1.addWidget(self.vis_3d)
        splitter1.addWidget(self.vis_instrument)
        splitter1.setSizes([800, 200])
        splitter2 = QtGui.QSplitter(QtCore.Qt.Vertical)
        splitter2.addWidget(splitter1)
        splitter2.addWidget(self.vis_sensors)
        splitter2.setSizes([400, 200])
        hbox.addWidget(splitter2)
        self.setLayout(hbox)
unitedit.py 文件源码 项目:pcbre 作者: pcbre 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, unitGroup, field_type=int):
        super(UnitLineEdit, self).__init__()
        self.unit_idx = 0
        self._value = 0
        self._field_type = float

        self.layout = QtGui.QHBoxLayout()
        self.layout.setContentsMargins(0,0,0,0)

        self.__lineEdit = PLineEdit()
        self.__lineEdit.editingFinished.connect(self.text_changed)

        self.__unitDropDown = QtGui.QComboBox()
        self.__unitDropDown.currentIndexChanged.connect(self.indexChanged)

        self._placeholder_value = None

        self.setLayout(self.layout)
        self.layout.addWidget(self.__lineEdit, 0)
        self.layout.addWidget(self.__unitDropDown, 1)

        self.setUnitGroup(unitGroup)
TransformGuiTemplate_pyside.py 文件源码 项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码 阅读 26 收藏 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)
TransformGuiTemplate_pyside.py 文件源码 项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码 阅读 23 收藏 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)
ui_menu_classes.py 文件源码 项目:TACTIC-Handler 作者: listyque 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, parent=None):
        super(self.__class__, self).__init__(parent=parent)

        self.setupUi(self)

        self.horizontalLayout = QtGui.QHBoxLayout(self.buttonLabel)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)

        self.toolButton = QtGui.QToolButton(self)
        self.toolButton.setAutoRaise(True)
        self.toolButton.setArrowType(QtCore.Qt.DownArrow)
        self.horizontalLayout.addWidget(self.toolButton)
design.py 文件源码 项目:TWTools 作者: ZeX2 项目源码 文件源码 阅读 21 收藏 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)
editor.py 文件源码 项目:CaptsLog 作者: jaehoonhwang 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def setupUi(self, MainWindow):
        """Setting up UI for Main Window
        """
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(804, 600)

        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")

        self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName("horizontalLayout")

        self.txtInput = QtGui.QPlainTextEdit(self.centralwidget)
        self.txtInput.setObjectName("MarkDtextEdit")
        self.horizontalLayout.addWidget(self.txtInput)

        self.txtOutput = QtGui.QTextEdit(self.centralwidget)
        self.txtOutput.setObjectName("MarkDownView")
        self.horizontalLayout.addWidget(self.txtOutput)

        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 804, 21))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
GDT.py 文件源码 项目:FreeCAD-GDT 作者: juanvanyo 项目源码 文件源码 阅读 18 收藏 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


问题


面经


文章

微信
公众号

扫码关注公众号