From 8f1db718f9bab8d58b539803516b07f5cb866353 Mon Sep 17 00:00:00 2001 From: Daniel D'Souza Date: Tue, 5 Nov 2019 11:28:29 -0600 Subject: [PATCH] adjusted import for melodic --- .gitignore | 2 ++ src/rqt_launchtree/launchtree_plugin.py | 3 ++- src/rqt_launchtree/launchtree_widget.py | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1dbc687..550b189 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,5 @@ target/ #Ipython Notebook .ipynb_checkpoints + +.idea diff --git a/src/rqt_launchtree/launchtree_plugin.py b/src/rqt_launchtree/launchtree_plugin.py index 14bd166..48666d4 100644 --- a/src/rqt_launchtree/launchtree_plugin.py +++ b/src/rqt_launchtree/launchtree_plugin.py @@ -3,7 +3,8 @@ from rqt_gui_py.plugin import Plugin from python_qt_binding.QtCore import Qt -from python_qt_binding.QtGui import QInputDialog +# from python_qt_binding.QtGui import QInputDialog +from python_qt_binding.QtWidgets import QInputDialog from rqt_launchtree.launchtree_widget import LaunchtreeWidget diff --git a/src/rqt_launchtree/launchtree_widget.py b/src/rqt_launchtree/launchtree_widget.py index 495a08d..d3fb9ce 100644 --- a/src/rqt_launchtree/launchtree_widget.py +++ b/src/rqt_launchtree/launchtree_widget.py @@ -14,7 +14,8 @@ from python_qt_binding import loadUi from python_qt_binding.QtCore import Qt, Signal -from python_qt_binding.QtGui import QFileDialog, QWidget, QIcon, QTreeWidgetItem, QColor +from python_qt_binding.QtGui import QIcon, QColor +from python_qt_binding.QtWidgets import QFileDialog, QWidget, QTreeWidgetItem class LaunchtreeEntryItem(QTreeWidgetItem): _type_order = [dict, roslaunch.core.Node, LaunchtreeRosparam, roslaunch.core.Param, LaunchtreeRemap, LaunchtreeArg, object] @@ -321,7 +322,7 @@ def filter_launch_entry(entry): show &= search_text in entry.text(0) if show: - entry.setBackgroundColor(0, self._highlight_color if highlight else self._neutral_color) + entry.setBackground(0, self._highlight_color if highlight else self._neutral_color) if entry.childCount() > 0: not_empty = any(map(filter_launch_entry, map(entry.child, range(entry.childCount()))))