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


Python QAction.setText方法代码示例

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


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

示例1: popup

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
    def popup(self,pos):
        menu = QMenu()

        saveRepAction = QAction(self)
        saveRepAction.setText('Save representation...')
        saveRepAction.triggered.connect(lambda: self.saveRep(self.indexAt(pos)))
        menu.addAction(saveRepAction)
        action = menu.exec_(self.mapToGlobal(pos))
开发者ID:mmcauliffe,项目名称:exemplar-network-explorer,代码行数:10,代码来源:views.py

示例2: create_rev_action

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
 def create_rev_action(self, repo, *revs):
     action = QAction(self.revs_menu)
     action.revs = revs
     action.setText(', '.join(str(rev) for rev in revs))
     action.setCheckable(True)
     action.setActionGroup(self.rev_actions)
     action.triggered.connect(self._revs_action_triggered)
     return action
开发者ID:vstojkovic,项目名称:berk,代码行数:10,代码来源:__init__.py

示例3: __LobbyListMenu

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
    def __LobbyListMenu( self, position ):
        lobby_menu      = QMenu()

        rm_from_lobby   = QAction( self )
        rm_from_lobby.setText( "Remove player from lobby" )
        rm_from_lobby.triggered.connect( self._RemoveFromLobbyListAction )

        lobby_menu.addAction( rm_from_lobby )

        lobby_menu.exec_( self.window.lobby_lst.viewport().mapToGlobal( position ) )
开发者ID:montreal91,项目名称:workshop,代码行数:12,代码来源:main.py

示例4: showHeaderMenu

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
    def showHeaderMenu( self, pos ):
        header = self.horizontalHeader()
        column = header.logicalIndexAt(pos.x())

        filterAction = QAction(self)
        filterAction.setText('Filter column')
        filterAction.triggered.connect(lambda: self.filterColumn(self.indexAt(pos)))
        symbolAction = QAction(self)
        symbolAction.setText('Symbol')
        symbolAction.triggered.connect(lambda: self.changeColumnDisplay(self.indexAt(pos),'symbol'))
        colourAction = QAction(self)
        colourAction.setText('Color')
        colourAction.triggered.connect(lambda: self.changeColumnDisplay(self.indexAt(pos),'brush'))
        sizeAction = QAction(self)
        sizeAction.setText('Size')
        sizeAction.triggered.connect(lambda: self.changeColumnDisplay(self.indexAt(pos),'size'))
        # show menu about the column
        menu = QMenu(self)
        displayMenu = menu.addMenu('Change graph display')
        displayMenu.addAction(symbolAction)
        displayMenu.addAction(colourAction)
        displayMenu.addAction(sizeAction)
        menu.addAction(filterAction)

        menu.popup(header.mapToGlobal(pos))
开发者ID:mmcauliffe,项目名称:exemplar-network-explorer,代码行数:27,代码来源:views.py

示例5: __PlayersListMenu

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
    def __PlayersListMenu( self, position ):
        list_menu           = QMenu()

        add_player_to_lobby = QAction( self )
        add_player_to_lobby.setText( "Add player to lobby" )
        add_player_to_lobby.triggered.connect( self._AddToLobbyAction )

        rm_player           = QAction( self )
        rm_player.setText( "Remove player" )
        rm_player.triggered.connect( self._RemoveFromPlayersListAction )

        list_menu.addAction( rm_player )
        list_menu.addAction( add_player_to_lobby )

        list_menu.exec_( self.window.players_lst.viewport().mapToGlobal( position ) )
开发者ID:montreal91,项目名称:workshop,代码行数:17,代码来源:main.py

示例6: _customMenu

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
 def _customMenu(self):
     selectedItems = self.pushupsListWidget.selectedItems()
     
     if selectedItems is not None :
         selectedItem = selectedItems[0] 
         
         if selectedItem.parent() is not None : # Child Item selected
             menu = QMenu()
             
             delete = QAction(self.pushupsListWidget)
             delete.setText("Delete this pushup")
             delete.triggered.connect(self._emitDeleteSignal)
             menu.addAction(delete)
             menu.exec_(QCursor.pos())
         else : # Top level Item selected
             menu = QMenu()
          
             delete = QAction(self.pushupsListWidget)
             delete.setText("Delete this day and all of its exercises")
             delete.triggered.connect(self._emitDeleteDaySignal)
             menu.addAction(delete)
             menu.exec_(QCursor.pos())
开发者ID:davcri,项目名称:Pushup-app,代码行数:24,代码来源:PushupList.py

示例7: ConfigEditor

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
class ConfigEditor(QMainWindow):
    
    def __init__(self, app, cfg, title='Config Editor'):
        super(ConfigEditor, self).__init__()
        
        self.app = app
        self.config = cfg
        self.title = title
        
    def setup(self):
        
        self.dirty = False
        
        self.def_cfg = copy.deepcopy(self.config)
        self.config.update_from_user_file()
        self.base_cfg = copy.deepcopy(self.config)
        
        self.categories = QListWidget()
        #self.categories.setSizePolicy(QSizePolicy.Fixed,QSizePolicy.Expanding)
        self.settings = QStackedWidget()
        #self.categories.setSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.Expanding)
        
        QObject.connect(self.categories, SIGNAL('itemSelectionChanged()'), self.category_selected)
        
        self.widget_list = {}
        for cat in self.config.get_categories():
            self.widget_list[cat] = {}
        longest_cat = 0
        for cat in self.config.get_categories():
            if len(cat) > longest_cat:
                longest_cat = len(cat)
            self.categories.addItem(cat)
            settings_layout = QGridLayout()
            r = 0
            c = 0
            for setting in self.config.get_settings(cat):
                info = self.config.get_setting(cat, setting, True)
                s = QWidget()
                s.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed)
                sl = QVBoxLayout()
                label = QLabel()
                if info.has_key('alias'):
                    label.setText(info['alias'])
                else:
                    label.setText(setting)
                if info.has_key('about'):
                    label.setToolTip(info['about'])
                sl.addWidget(label)
                if info['type'] == constants.CT_LINEEDIT:
                    w = LineEdit(self, self.config,cat,setting,info)
                elif info['type'] == constants.CT_CHECKBOX:
                    w = CheckBox(self, self.config,cat,setting,info)
                elif info['type'] == constants.CT_SPINBOX:
                    w = SpinBox(self, self.config,cat,setting,info)
                elif info['type'] == constants.CT_DBLSPINBOX:
                    w = DoubleSpinBox(self, self.config,cat,setting,info)
                elif info['type'] == constants.CT_COMBO:
                    w = ComboBox(self, self.config,cat,setting,info)
                w.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed)
                self.widget_list[cat][setting] = w
                sl.addWidget(w)
                s.setLayout(sl)
                c = self.config.config[cat].index(setting) % 2
                settings_layout.addWidget(s, r, c)
                if c == 1:
                    r += 1
            settings = QWidget()
            settings.setLayout(settings_layout)
            settings_scroller = QScrollArea()
            settings_scroller.setWidget(settings)
            settings_scroller.setWidgetResizable(True)
            self.settings.addWidget(settings_scroller)
            
        font = self.categories.font()
        fm = QFontMetrics(font)
        self.categories.setMaximumWidth(fm.widthChar('X')*(longest_cat+4))
        
        self.main = QWidget()
        self.main_layout = QVBoxLayout()
        
        self.config_layout = QHBoxLayout()
        self.config_layout.addWidget(self.categories)
        self.config_layout.addWidget(self.settings)
        
        self.mainButtons = QDialogButtonBox(QDialogButtonBox.RestoreDefaults | QDialogButtonBox.Reset | QDialogButtonBox.Apply)
        self.main_apply = self.mainButtons.button(QDialogButtonBox.StandardButton.Apply)
        self.main_reset = self.mainButtons.button(QDialogButtonBox.StandardButton.Reset)
        self.main_defaults = self.mainButtons.button(QDialogButtonBox.StandardButton.LastButton)
        QObject.connect(self.mainButtons, SIGNAL('clicked(QAbstractButton *)'), self.mainbutton_clicked)
        
        self.dirty_check()
        
        self.main_layout.addLayout(self.config_layout)
        self.main_layout.addWidget(self.mainButtons)
        
        self.main.setLayout(self.main_layout)
        
        self.setCentralWidget(self.main)
        self.setWindowTitle(self.title)
        self.setUnifiedTitleAndToolBarOnMac(True)
#.........这里部分代码省略.........
开发者ID:RyanHope,项目名称:jsonConfig,代码行数:103,代码来源:editor.py

示例8: serverManagerWindow

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]

#.........这里部分代码省略.........
                    self.users.addUserFriend(user, friend)
            self.users.userDataSave()    
        self.delUsrInfo = None        
        uiDebug("userInfoUndoDelRow")


    def userInfoSaveData(self):
        '''保留用户数据'''
        if self.users:
            model = self.ui.userInfo_tableView.model()
            index = self.ui.userInfo_tableView.selectionModel().currentIndex()
            for row in range(model.rowCount(index.parent())):
                user = model.item(row, 0).index().data()
                friendlist = model.item(row, 1).index().data()
                if user != "[No data]":
                    self.users.addUser(user, "admin")
                if friendlist != "[No data]":
                    for friend in friendlist.split(","):
                        if friend != '':
                            self.users.addUserFriend(user, friend)   
        
            self.users.userDataSave()
            self.clearUserInfo()    
            self.showUserinfo()
        uiDebug("userInfoSaveData")        
    

    def showConfig(self):
        '''显示配置'''
#        print self.Config.getControlMedia()    
#        print self.Config.getControlMediaPath()   
#        print self.ControlMedia
#        print self.ControlMediaPath     
        self.ui.information_textBrowser.setText("Control Media: " + self.ControlMedia)
        self.ui.information_textBrowser.append("Control Media path: " + self.ControlMediaPath)

    def showUserinfo(self):
        '''显示用户信息'''
        userlist = self.users.getUsers()
        print "showUserinfo "
        print userlist
        row = 0
        for user in userlist:
            friends = userlist[user]
            self.userModel.setItem(row, 0, QStandardItem(user))
            self.userModel.setItem(row, 1, QStandardItem(friends))
            row = row + 1  
        #pylint: disable=W0201    
        self.delUsrInfo = None
    
    def clearUserInfo(self):
        '''清除用户信息'''
        self.userModel.clear()
        self.delUsrInfo = None

        
    def userConfig(self):
        self.showConfig()
        if self.users != None:
            del self.users        
        #服务器配置
        if self.ControlMedia == mediaValue[txt]:
            #txt文件保留用户信息
            self.users = txtUserControl(self.ControlMediaPath)
            self.ui.text_groupBox.setChecked(True)
            self.ui.text_lineEdit.setText(self.ControlMediaPath)
开发者ID:xiaomdong,项目名称:xdIm,代码行数:70,代码来源:serverManager.py

示例9: Ui_MainWindow

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]

#.........这里部分代码省略.........

        self.lb_subject = QLabel(self.search_gbox)
        self.lb_subject.setObjectName("lb_subject")
        self.lb_subject.setMinimumWidth(lbMinWidth)
        self.subject_le = QLineEdit(self.search_gbox)
        self.subject_le.setObjectName("subject_le")
        search_gbox_subject_layout.addWidget(self.lb_subject)
        search_gbox_subject_layout.addWidget(self.subject_le)

        self.lb_threads = QLabel(self.search_gbox)
        self.lb_threads.setObjectName("lb_threads")
        self.lb_threads.setMaximumWidth(lbMinWidth)
        self.thread_count_sb = QSpinBox(self.search_gbox)
        self.thread_count_sb.setMinimum(1)
        self.thread_count_sb.setMaximum(10)
        self.thread_count_sb.setObjectName("thread_count_sb")
        self.html_radio = QRadioButton(self.search_gbox)
        self.html_radio.setObjectName("html_radio")
        self.text_radio = QRadioButton(self.search_gbox)
        self.text_radio.setObjectName("text_radio")
        self.extactTypeButtonGroup = QButtonGroup(self)
        self.extactTypeButtonGroup.addButton(self.html_radio)
        self.extactTypeButtonGroup.addButton(self.text_radio)
        self.html_radio.setChecked(True)
        self.search_btn = QPushButton(self.search_gbox)
        self.search_btn.setObjectName("search_btn")
        search_gbox_threads_layout.addWidget(self.lb_threads)
        search_gbox_threads_layout.addWidget(self.thread_count_sb)
        search_gbox_threads_layout.addWidget(self.html_radio)
        search_gbox_threads_layout.addWidget(self.text_radio)
        search_gbox_threads_layout.addWidget(self.search_btn)

        self.parameters_cb = QCheckBox(self.search_gbox)
        self.parameters_cb.setText("")
        self.parameters_cb.setObjectName("parameters_cb")
        self.parameters_le = QLineEdit(self.search_gbox)
        self.parameters_le.setEnabled(False)
        self.parameters_le.setObjectName("parameters_le")
        search_gbox_paramaters_layout.addWidget(self.parameters_cb)
        search_gbox_paramaters_layout.addWidget(self.parameters_le)

        #### log_gbox
        self.log_gbox = QGroupBox(self.leftSplitter)
        self.log_gbox.setFlat(True)
        self.log_gbox.setObjectName("log_gbox")
        log_layout = QVBoxLayout(self.log_gbox)
        self.log_te = QTextEdit(self.log_gbox)
        self.log_te.setLineWrapMode(QTextEdit.NoWrap)
        self.log_te.setReadOnly(True)
        self.log_te.setTextInteractionFlags(Qt.TextSelectableByKeyboard | Qt.TextSelectableByMouse)
        self.log_te.setObjectName("log_te")

        self.disconnect_btn = QPushButton(self.log_gbox)
        self.disconnect_btn.setObjectName("disconnect_btn")
        self.disconnect_btn.hide()
        log_layout.addWidget(self.log_te)
        log_layout_btn = QHBoxLayout()
        log_layout.addLayout(log_layout_btn)
        log_layout_btn.addWidget(self.disconnect_btn)
        log_layout_btn.addStretch()

        #### links_gbox
        self.links_gbox = QGroupBox(self.mainSplitter)
        self.links_gbox.setFlat(True)
        self.links_gbox.setObjectName("links_gbox")
        self.links_gbox.hide()
开发者ID:erdinc-me,项目名称:GmailURLParser,代码行数:70,代码来源:gui_gmailURLParser.py

示例10: Ui_MainWindow

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):

        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(810, 492)

        lbMinWidth = 65
        lbMinWidthLogin = 110
        # leMinWidth = 200

        # self.centralwidget = QWidget(MainWindow)
        self.mainSplitter = QSplitter(Qt.Horizontal, MainWindow)
        self.mainSplitter.setObjectName("centralwidget")
        self.mainSplitter.setProperty("childrenCollapsible", False)
        MainWindow.setCentralWidget(self.mainSplitter)

        self.leftSplitter = QSplitter(Qt.Vertical, self.mainSplitter)
        self.leftSplitter.setProperty("childrenCollapsible", False)

        # login_gbox
        self.login_gbox = QGroupBox(self.leftSplitter)
        self.login_gbox.setFlat(True)
        self.login_gbox.setObjectName("login_gbox")

        login_gbox_layout = QVBoxLayout(self.login_gbox)
        login_gbox_presets_layout = QHBoxLayout()
        login_gbox_server_layout = QHBoxLayout()
        login_gbox_ssl_layout = QHBoxLayout()
        login_gbox_address_layout = QHBoxLayout()
        login_gbox_pass_layout = QHBoxLayout()
        login_gbox_connect_layout = QHBoxLayout()
        login_gbox_layout.addLayout(login_gbox_presets_layout)
        login_gbox_layout.addLayout(login_gbox_server_layout)
        login_gbox_layout.addLayout(login_gbox_ssl_layout)
        login_gbox_layout.addLayout(login_gbox_address_layout)
        login_gbox_layout.addLayout(login_gbox_pass_layout)
        login_gbox_layout.addLayout(login_gbox_connect_layout)

        self.lb_presets = QLabel(self.login_gbox)
        self.lb_presets.setObjectName("lb_presets")
        self.lb_presets.setMinimumWidth(lbMinWidthLogin)
        self.lb_presets.setMaximumWidth(lbMinWidthLogin)
        self.presets_cbox = QComboBox(self.login_gbox)
        self.presets_cbox.setObjectName("presets_cbox")
        self.add_preset_btn = QPushButton(self.login_gbox)
        self.add_preset_btn.setObjectName("add_preset_btn")
        self.add_preset_btn.setMaximumWidth(30)
        self.remove_preset_btn = QPushButton(self.login_gbox)
        self.remove_preset_btn.setObjectName("remove_preset_btn")
        self.remove_preset_btn.setMaximumWidth(20)
        login_gbox_presets_layout.addWidget(self.lb_presets)
        login_gbox_presets_layout.addWidget(self.presets_cbox)
        login_gbox_presets_layout.addWidget(self.add_preset_btn)
        login_gbox_presets_layout.addWidget(self.remove_preset_btn)

        self.lb_imap_server = QLabel(self.login_gbox)
        self.lb_imap_server.setObjectName("lb_imap_server")
        self.lb_imap_server.setMinimumWidth(lbMinWidthLogin)
        self.imap_server_le = QLineEdit(self.login_gbox)
        self.imap_server_le.setObjectName("imap_server_le")
        login_gbox_server_layout.addWidget(self.lb_imap_server)
        login_gbox_server_layout.addWidget(self.imap_server_le)

        self.lb_ssl = QLabel(self.login_gbox)
        self.lb_ssl.setObjectName("lb_ssl")
        self.lb_ssl.setMinimumWidth(lbMinWidthLogin)
        self.lb_ssl.setMaximumWidth(lbMinWidthLogin)
        self.ssl_cb = QCheckBox(self.login_gbox)
        self.ssl_cb.setEnabled(False)
        self.ssl_cb.setCheckable(True)
        self.ssl_cb.setChecked(True)
        self.ssl_cb.setObjectName("ssl_cb")
        login_gbox_ssl_layout.addWidget(self.lb_ssl)
        login_gbox_ssl_layout.addWidget(self.ssl_cb)

        self.lb_adress = QLabel(self.login_gbox)
        self.lb_adress.setObjectName("lb_adress")
        self.lb_adress.setMinimumWidth(lbMinWidthLogin)
        self.adress_le = QLineEdit(self.login_gbox)
        self.adress_le.setInputMethodHints(Qt.ImhNone)
        self.adress_le.setObjectName("adress_le")
        login_gbox_address_layout.addWidget(self.lb_adress)
        login_gbox_address_layout.addWidget(self.adress_le)

        self.lb_pass = QLabel(self.login_gbox)
        self.lb_pass.setObjectName("lb_pass")
        self.lb_pass.setMinimumWidth(lbMinWidthLogin)
        self.pass_le = QLineEdit(self.login_gbox)
        self.pass_le.setText("")
        self.pass_le.setEchoMode(QLineEdit.Password)
        self.pass_le.setObjectName("pass_le")
        login_gbox_pass_layout.addWidget(self.lb_pass)
        login_gbox_pass_layout.addWidget(self.pass_le)

        self.connect_btn = QPushButton(self.login_gbox)
        self.connect_btn.setObjectName("connect_btn")
        login_gbox_connect_layout.addStretch()
        login_gbox_connect_layout.addWidget(self.connect_btn)

        # search_gbox
#.........这里部分代码省略.........
开发者ID:erdinc-me,项目名称:IMAPLinkParser,代码行数:103,代码来源:gui_IMAPLinkParser.py

示例11: Truss

# 需要导入模块: from PySide.QtGui import QAction [as 别名]
# 或者: from PySide.QtGui.QAction import setText [as 别名]
class Truss(QMainWindow):
    def __init__(self, parent=None):
        super(Truss, self).__init__(parent)        
        self.resize(800, 600)
        self.filename  = None
        self.filetuple = None
        self.dirty = False  # Refers to Data Page only.
        centralwidget = QWidget(self)
        gridLayout = QGridLayout(centralwidget)
        self.tabWidget = QTabWidget(centralwidget)
        self.tab = QWidget()
        font = QFont()
        font.setFamily("Courier 10 Pitch")
        font.setPointSize(12)
        self.tab.setFont(font)
        gridLayout_3 = QGridLayout(self.tab)
        self.plainTextEdit = QPlainTextEdit(self.tab)
        gridLayout_3.addWidget(self.plainTextEdit, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QWidget()
        self.tab_2.setFont(font)
        gridLayout_2 = QGridLayout(self.tab_2)
        self.plainTextEdit_2 = QPlainTextEdit(self.tab_2)
        gridLayout_2.addWidget(self.plainTextEdit_2, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tab_2, "")
        gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
        self.setCentralWidget(centralwidget)
        menubar = QMenuBar(self)
        menubar.setGeometry(QRect(0, 0, 800, 29))
        menu_File = QMenu(menubar)
        self.menu_Solve = QMenu(menubar)
        self.menu_Help = QMenu(menubar)
        self.setMenuBar(menubar)
        self.statusbar = QStatusBar(self)
        self.setStatusBar(self.statusbar)
        self.action_New = QAction(self)
        self.actionSave_As = QAction(self)
        self.action_Save = QAction(self)
        self.action_Open = QAction(self)
        self.action_Quit = QAction(self)
        self.action_About = QAction(self)
        self.actionShow_CCPL = QAction(self)
        self.action_Solve = QAction(self)
        self.action_CCPL = QAction(self)
        self.action_Help = QAction(self)
        menu_File.addAction(self.action_New)
        menu_File.addAction(self.action_Open)
        menu_File.addAction(self.actionSave_As)
        menu_File.addAction(self.action_Save)
        menu_File.addSeparator()
        menu_File.addAction(self.action_Quit)
        self.menu_Solve.addAction(self.action_Solve)
        self.menu_Help.addAction(self.action_About)
        self.menu_Help.addAction(self.action_CCPL)
        self.menu_Help.addAction(self.action_Help)
        menubar.addAction(menu_File.menuAction())
        menubar.addAction(self.menu_Solve.menuAction())
        menubar.addAction(self.menu_Help.menuAction())        
        self.setWindowTitle("Main Window")
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab),\
                                   "Data Page")
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2),\
                                   "Solution Page")        
        menu_File.setTitle("&File")        
        self.menu_Solve.setTitle("&Solve")
        self.menu_Help.setTitle("&Help")
        self.tabWidget.setCurrentIndex(0)
        self.action_New.setText("&New") 
        self.action_Open.setText("&Open")       
        self.actionSave_As.setText("Save &As")
        self.action_Save.setText("&Save")
        self.action_Quit.setText("&Quit")        
        self.action_Solve.setText("&Solve")
        self.action_About.setText("&About")
        self.action_CCPL.setText("&CCPL")
        self.action_Help.setText("&Help")
        self.action_Quit.triggered.connect(self.close)
        allToolBar = self.addToolBar("AllToolBar") 
        allToolBar.setObjectName("AllToolBar") 
        self.addActions(allToolBar, (self.action_Open, self.actionSave_As,\
                        self.action_Save, self.action_Solve,\
                        self.action_Quit ))
        self.action_New.triggered.connect(self.fileNew)
        self.action_Open.triggered.connect(self.fileOpen)
        self.actionSave_As.triggered.connect(self.fileSaveAs)
        self.action_Save.triggered.connect(self.fileSave)
        self.action_Solve.triggered.connect(self.trussSolve)
        self.action_About.triggered.connect(self.aboutBox)
        self.action_CCPL.triggered.connect(self.displayCCPL)
        self.action_Help.triggered.connect(self.help)
        self.plainTextEdit.textChanged.connect(self.setDirty)
        self.action_New = self.editAction(self.action_New, None,\
                            'ctrl+N', 'filenew', 'New File.')   
        self.action_Open = self.editAction(self.action_Open, None, 
                            'ctrl+O', 'fileopen', 'Open File.')
        self.actionSave_As = self.editAction(self.actionSave_As,\
                            None, 'ctrl+A', 'filesaveas',\
                            'Save and Name File.')
        self.action_Save = self.editAction(self.action_Save, None, 
                            'ctrl+S', 'filesave', 'Save File.')
#.........这里部分代码省略.........
开发者ID:Averroes,项目名称:tuts4pyside,代码行数:103,代码来源:truss.py


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