Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
observers.append(button_dev_attribute)
#
self._widget_about = About(self)
button_about = ActionShowAbout(
icon='about.png', title='About', parent=self,
action=self.action_on_show_about
)
button_about.setToolTip(
compose_tooltip('Show information about Harvester')
)
button_about.toggle()
observers.append(button_about)
#
self._widget_device_list = ComboBox(self)
self._widget_device_list.setSizeAdjustPolicy(
QComboBox.AdjustToContents
)
shortcut_key = 'Ctrl+Shift+d'
shortcut = QShortcut(QKeySequence(shortcut_key), self)
def show_popup():
self._widget_device_list.showPopup()
shortcut.activated.connect(show_popup)
self._widget_device_list.setToolTip(
compose_tooltip('Select a device to connect', shortcut_key)
)
observers.append(self._widget_device_list)
for d in self.harvester_core.device_info_list:
self._widget_device_list.addItem(d)
observers.append(button_dev_attribute)
#
self._widget_about = About(self)
button_about = ActionShowAbout(
icon='about.png', title='About', parent=self,
action=self.action_on_show_about
)
button_about.setToolTip(
compose_tooltip('Show information about Harvester')
)
button_about.toggle()
observers.append(button_about)
#
self._widget_device_list = ComboBox(self)
self._widget_device_list.setSizeAdjustPolicy(
QComboBox.AdjustToContents
)
shortcut_key = 'Ctrl+Shift+d'
shortcut = QShortcut(QKeySequence(shortcut_key), self)
def show_popup():
self._widget_device_list.showPopup()
shortcut.activated.connect(show_popup)
self._widget_device_list.setToolTip(
compose_tooltip('Select a device to connect', shortcut_key)
)
observers.append(self._widget_device_list)
for d in self.harvester_core.device_info_list:
self._widget_device_list.addItem(d)