本文整理匯總了Python中gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog.getSymbol方法的典型用法代碼示例。如果您正苦於以下問題:Python SymbolSelectionDialog.getSymbol方法的具體用法?Python SymbolSelectionDialog.getSymbol怎麽用?Python SymbolSelectionDialog.getSymbol使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog
的用法示例。
在下文中一共展示了SymbolSelectionDialog.getSymbol方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _symbolBrowserSlot
# 需要導入模塊: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 別名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import getSymbol [as 別名]
def _symbolBrowserSlot(self):
"""
Slot to open the symbol browser and select a new symbol.
"""
symbol_path = self.uiSymbolLineEdit.text()
dialog = SymbolSelectionDialog(self, symbol=symbol_path)
dialog.show()
if dialog.exec_():
new_symbol_path = dialog.getSymbol()
self.uiSymbolLineEdit.setText(new_symbol_path)
self.uiSymbolLineEdit.setToolTip('<img src="{}"/>'.format(new_symbol_path))