fix card layout screen on qt 5.9 regression (#592)

This commit is contained in:
Damien Elmes 2020-05-05 11:24:33 +10:00
parent 9bb4a02e0a
commit b932333246

View file

@ -308,10 +308,15 @@ Please create a new card type first."""
self.tform.front.setAcceptRichText(False)
self.tform.css.setAcceptRichText(False)
self.tform.back.setAcceptRichText(False)
tab_width = self.fontMetrics().width(" " * 4)
self.tform.front.setTabStopDistance(tab_width)
self.tform.css.setTabStopDistance(tab_width)
self.tform.back.setTabStopDistance(tab_width)
if qtminor < 10:
self.tform.front.setTabStopWidth(30)
self.tform.css.setTabStopWidth(30)
self.tform.back.setTabStopWidth(30)
else:
tab_width = self.fontMetrics().width(" " * 4)
self.tform.front.setTabStopDistance(tab_width)
self.tform.css.setTabStopDistance(tab_width)
self.tform.back.setTabStopDistance(tab_width)
self.redrawing = False
def saveCard(self):