Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions lib/python/qtvcp/widgets/basic_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,10 @@ def buildWidget(self):
l.addWidget(bBox)
self.setLayout(l)

try:
self.next(t)
except Exception as e:
t.setText('Basic Probe Help file Unavailable:\n\n{}'.format(e))
# Load the first help page lazily (on first show): pre-scaling its
# images at construction can hang or crash qtvcp headless.
self._helpText = t
self._helpLoaded = False

def _set_scaled_html(self, t, html):
# QTextEdit scales raster images with a nearest-neighbour filter, which
Expand Down Expand Up @@ -686,6 +686,12 @@ def close(self):
super(HelpDialog, self).close()

def showDialog(self):
if not self._helpLoaded:
try:
self.next(self._helpText)
except Exception as e:
self._helpText.setText('Basic Probe Help file Unavailable:\n\n{}'.format(e))
self._helpLoaded = True
self.setWindowTitle(self._title);
self.set_geometry()
retval = self.exec()
Expand Down
14 changes: 10 additions & 4 deletions lib/python/qtvcp/widgets/versa_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,10 +683,10 @@ def buildWidget(self):
l.addWidget(bBox)
self.setLayout(l)

try:
self.next(t)
except Exception as e:
t.setText('Versa Probe Help file Unavailable:\n\n{}'.format(e))
# Load the first help page lazily (on first show): pre-scaling its
# images at construction can hang or crash qtvcp headless.
self._helpText = t
self._helpLoaded = False

def _set_scaled_html(self, t, html):
# QTextEdit scales raster images with a nearest-neighbour filter, which
Expand Down Expand Up @@ -757,6 +757,12 @@ def close(self):
super(HelpDialog, self).close()

def showDialog(self):
if not self._helpLoaded:
try:
self.next(self._helpText)
except Exception as e:
self._helpText.setText('Versa Probe Help file Unavailable:\n\n{}'.format(e))
self._helpLoaded = True
self.setWindowTitle(self._title);
self.set_geometry()
retval = self.exec()
Expand Down
Loading