diff --git a/qutebrowser/widgets/crash.py b/qutebrowser/widgets/crash.py index 608755558..983a9f810 100644 --- a/qutebrowser/widgets/crash.py +++ b/qutebrowser/widgets/crash.py @@ -71,6 +71,7 @@ class CrashDialog(QDialog): "open tabs.") self._lbl.setText(text) self._lbl.setWordWrap(True) + self._set_text_flags(self._lbl) self._vbox.addWidget(self._lbl) self._txt = QTextEdit() @@ -79,10 +80,7 @@ class CrashDialog(QDialog): self._vbox.addWidget(self._txt) self._url = QLabel() - self._url.setTextInteractionFlags(Qt.TextSelectableByMouse | - Qt.TextSelectableByKeyboard | - Qt.LinksAccessibleByMouse | - Qt.LinksAccessibleByKeyboard) + self._set_text_flags(self._url) self._vbox.addWidget(self._url) self._hbox = QHBoxLayout() @@ -104,6 +102,17 @@ class CrashDialog(QDialog): self._vbox.addLayout(self._hbox) + def _set_text_flags(self, obj): + """Set text interaction flags of a widget to allow link clicking. + + Args: + obj: A QLabel. + """ + obj.setTextInteractionFlags(Qt.TextSelectableByMouse | + Qt.TextSelectableByKeyboard | + Qt.LinksAccessibleByMouse | + Qt.LinksAccessibleByKeyboard) + def _crash_info(self, pages, cmdhist, exc): """Gather crash information to display.