Change the codeView tabStopDistance to 4 spaces based on the size of the current font
(self,font)
| 376 | return super().event(event) |
| 377 | |
| 378 | def updateCodeViewTabWidth(self,font): |
| 379 | """ |
| 380 | Change the codeView tabStopDistance to 4 spaces based on the size of the current font |
| 381 | """ |
| 382 | fm = QtGui.QFontMetrics(font) |
| 383 | tabWidth = fm.horizontalAdvance(' ' * 4) |
| 384 | # the default value is 80 pixels! that's more than 2x what we want. |
| 385 | self.ui.codeView.setTabStopDistance(tabWidth) |
| 386 | |
| 387 | def showEvent(self, event) -> None: |
| 388 | super(ExampleLoader, self).showEvent(event) |
no outgoing calls
no test coverage detected