当前位置: 首页>>代码示例>>Python>>正文


Python QLabel.show方法代码示例

本文整理汇总了Python中qt.QLabel.show方法的典型用法代码示例。如果您正苦于以下问题:Python QLabel.show方法的具体用法?Python QLabel.show怎么用?Python QLabel.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qt.QLabel的用法示例。


在下文中一共展示了QLabel.show方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: showSplash

# 需要导入模块: from qt import QLabel [as 别名]
# 或者: from qt.QLabel import show [as 别名]
def showSplash(splashImageName):
    """
    Function which shows a nice splash screen.

    @param splashImageName: Name of the splash screen image.
    @type splashImageName: C{unicode}
    """

    screen = QApplication.desktop().screenGeometry()

    if not _haveImagesAsModule:
        addQtImagePath(constants.LOCAL_INSTALLED_ICONS_DIRECTORY_PATH)
    dfPicture = QPixmap.fromMimeSource(splashImageName)

    dfSplash = QLabel(None, "splash",
                      Qt.WDestructiveClose | Qt.WStyle_Customize | Qt.WStyle_NoBorder |\
                      Qt.WX11BypassWM | Qt.WStyle_StaysOnTop)
    dfSplash.setFrameStyle(QFrame.WinPanel | QFrame.Raised)
    dfSplash.setPixmap(dfPicture)
    dfSplash.setCaption("DataFinder")
    dfSplash.setAutoResize(1)
    dfSplash.move(QPoint(screen.center().x() - dfSplash.width() / 2,
                         screen.center().y() - dfSplash.height() / 2))
    dfSplash.show()
    dfSplash.repaint(0)
    QApplication.flush()
    return dfSplash
开发者ID:DLR-SC,项目名称:DataFinder,代码行数:29,代码来源:utils.py

示例2: addressidSelected

# 需要导入模块: from qt import QLabel [as 别名]
# 或者: from qt.QLabel import show [as 别名]
 def addressidSelected(self, url):
     addressid = int(str(url).split('.')[2])
     self.enableButtonOK(True)
     self.dialogs['address'].done(0)
     self.grid.selButton.close()
     n = self.grid.fields.index('addressid') + 1
     text = AddressLink(self.db, addressid).toxml()
     lbl = QLabel(text, self.page)
     lbl.show()
     self.grid.addMultiCellWidget(lbl, n, n, 1, 1)
     self.addressid = addressid
开发者ID:BackupTheBerlios,项目名称:konsultant-svn,代码行数:13,代码来源:gui.py

示例3: _setup_grid

# 需要导入模块: from qt import QLabel [as 别名]
# 或者: from qt.QLabel import show [as 别名]
 def _setup_grid(self):
     self._clear_grid()
     numfields = len(self.fields)
     for fnum in range(numfields):
         fname = self.fields[fnum]
         data = ''
         if self._data.has_key(fname):
             data = self._data[fname]
         #entry = KLineEdit(data, self)
         entry = TraitVariableLineEdit(data, self)
         entry.show()
         self.entries[fname] = entry
         label = QLabel(entry, fname, self, fname)
         label.show()
         self._labels[fname] = label
         self.grid.addWidget(label, fnum, 0)
         self.grid.addWidget(entry, fnum, 1)
开发者ID:joelsefus,项目名称:paella,代码行数:19,代码来源:recordedit.py

示例4: Statement

# 需要导入模块: from qt import QLabel [as 别名]
# 或者: from qt.QLabel import show [as 别名]
    db.open()
else:
    raise Error, 'bad db'
s = Statement()
cursor = QSqlCursor(None, True, QSqlDatabase.database(dbdriver, True))
#s.table = 'suites'
s.table = 'gunny_templates'
#query = QSqlQuery(q)
#cursor = query
print cursor.execQuery(str(s))
#print q
print cursor.size()
print dir(cursor)
fields = cursor.driver().recordInfo(cursor)
for f in fields:
    cursor.append(f)
cursor.setName(s.table)
#cursor.setMode(QSqlCursor.ReadOnly)
#cursor.execQuery(str(s))
dt = QDataTable(None)
dt.show()
dt.setSqlCursor(cursor, True, True)
#dt.setSort(cursor.primaryIndex())
dt.refresh()
#dt.refresh(QDataTable.RefreshAll)
hello = QLabel('<font color=blue>%s <i>Qt!</i></font>' % str(s), None)
app.setMainWidget(dt)
hello.setText('rows returned: %s' % str(cursor.size()))
hello.show()
app.exec_loop()
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:32,代码来源:qtdb.py

示例5: AdminMain

# 需要导入模块: from qt import QLabel [as 别名]
# 或者: from qt.QLabel import show [as 别名]
class AdminMain(AdminWindow):
    """ Implements the administration client functionality. """

    __tabDataTypesTitle = "Data Types"
    __tabRelationTypesTitle = "Relation Types"
    __tabDataStoresTitle = "Data Stores"

    __baseCaption = "DataFinder Administration Client - Server: "
    __errorMessageCaption = "DataFinder Administration Client: Error"
    __informationMessageCaption = "DataFinder Administration Client: Information"

    __logger = getDefaultLogger()

    def __init__(self, repositoryManager):
        """ Constructor. """

        # Init GUI
        AdminWindow.__init__(self)
        
        # set icon in window-title:
        self.setIcon(QPixmap.fromMimeSource("DF_Logo_24x24.png"))
        iconSet = QIconSet(QPixmap.fromMimeSource("dataType16.png"))
        self.dataNavigator.setTabIconSet(self.dataTypes, iconSet)
        iconSet = QIconSet(QPixmap.fromMimeSource("relationType16.png"))
        self.dataNavigator.setTabIconSet(self.relationTypes, iconSet)
        iconSet = QIconSet(QPixmap.fromMimeSource("dataStore16.png"))
        self.dataNavigator.setTabIconSet(self.dataStores, iconSet)

        logger_handler.installGuiLoggingHandler(self.__logger, self.logList)

        self.myStatusBar = self.statusBar()
        self.statusLabel1 = QLabel("DataFinder", self.myStatusBar)
        self.statusLabel2 = QLabel("OK", self.myStatusBar)

        self.myStatusBar.addWidget(self.statusLabel1, 80)
        self.myStatusBar.addWidget(self.statusLabel2, 20)

        self.statusLabel1.show()
        self.statusLabel2.show()
        self.myStatusBar.show()

        # prepare "About"-dialog:
        self.dfAboutDialog = about_dialog.AboutDialog()
        self.dfAboutDialog.setPixmap(QPixmap.fromMimeSource("about_datafinder_admin.png"))

        # Login-dialog:
        self.dfLoginDialog = login_dialog.LoginDialog(repositoryManager.preferences, parent=self, showurl=True)

        # IconView:
        propertyPanelLayout = QGridLayout(self.propertyPanel, 1, 1, 2, 6, "propertyPanelLayout")

        self.iconView = canvas_view.CanvasView(self.propertyPanel, self, "iconView", 0)
        propertyPanelLayout.addWidget(self.iconView, 0, 0)

        self.iconViewCanvas = self.iconView.canvas()

        self.connect(self.dfLoginDialog.okPushButton,
                     PYSIGNAL("updateWebdavServerView"),
                     self.updateWebdavServerSlot)
        self.connect(self.dataTypeBrowser, SIGNAL("doubleClicked(QListViewItem*)"), self.__addDataTypeIconSlot)
        self.connect(self.relationTypeBrowser, SIGNAL("doubleClicked(QListViewItem*)"), self.__addRelationTypeIconSlot)
        self.connect(self.dataStoreBrowser, SIGNAL("clicked(QListViewItem*)"), self.iconView.updateCanvasView)
        self.connect(self.dataStoreBrowser, SIGNAL("doubleClicked(QListViewItem*)"), self.editSlot)
        
        # Init model
        self._repositoryManager = repositoryManager
        self.repositoryConfiguration = None
        self._preferences = self._repositoryManager.preferences
        self._lastUploadDirectory = os.path.expanduser("~")

        self._dataTypes = list()
        self._relationTypes = list()
        self._dataStores = list()

        self.__setConnectionState(False)

    def __setConnectionState(self, isConnected):
        """
        Sets the enabled state of the actions in accordance to
        successful or unsuccessful connection.
        """

        self.iconView.clear()
        self.__setActionEnabledState(isConnected)
        
        if isConnected:
            self.setCaption(self.__baseCaption + unicode(self.repositoryConfiguration.repositoryConfigurationUri))
            iconPath = self.repositoryConfiguration.localIconFilePath
            if sys.platform == "win32" and iconPath.startswith("/"):
                iconPath = iconPath[1:]
            utils.addQtImagePath(iconPath)
        else:
            self.repositoryConfiguration = None
            enableActions = [self.fileConnectAction, self.fileExitAction,
                             self.fileCreateConfigurationAction, self.editPreferencesAction,
                             self.helpAboutAction]
            for action in enableActions:
                action.setEnabled(True)
            self.setCaption(self.__baseCaption + "<not connected>")

#.........这里部分代码省略.........
开发者ID:DLR-SC,项目名称:DataFinder,代码行数:103,代码来源:admin_application.py


注:本文中的qt.QLabel.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。