Looks like the names of the constants have been changed to
Without testing it I don't think that will work. StyledPanel has been replaced by Raised. I would expect something like this would do it -Sunken = QtWidgets.QFrame.Shadow.Sunken if isQt6 else self.SunkenRaised = QtWidgets.QFrame.Shadow.Raised if isQt6 else self.StyledPanelself.setFrameStyle(Raised | Sunken)Also, couldn't self.Shadow be used instead of QtWidgets.QFrame.Shadow?
Without testing it I don't think that will work.
As a practical matter, how are you managing to edit one of these files when Leo won't start until the file has been fixed?
If you check out an earlier changeset, you won't have the current copy of the file to work on.
I got qt_text to work - at least on the surface - with these changes:
I got qt_text to work - at least on the surface - with these changes:
#width = self.fm.width(str(max(1000, self.highest_line))) + self.w_adjust
if isQt6:
width = self.fm.boundingRect(str(max(1000, self.highest_line))).width()
else:
width = self.fm.width(str(max(1000, self.highest_line))) + self.w_adjust
if self.width() != width:
self.setFixedWidth(width)
It's possible that self.setFixedWidth(width) has had an API change - I didn't look it up to see. Perhaps this line didn't get executed so an error didn't show up.
On Apr 12, 2021, at 6:00 PM, tbp1...@gmail.com <tbp1...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/3f9f3c39-678b-4b22-b1a2-183ab0e04cb9n%40googlegroups.com.
I got qt_text to work - at least on the surface - with these changes:
If you want, I can push these changes to my branch and do a PR.
Major problem - in the body pane, when I highlight a line of text, then press <CNTL>, the line vanishes. I can get it back with <CTRL-C>. Sometimes it left a residue of strange non-ascii characters, but I'm not sure what else I did to cause that (see attached screenshot).
The shift and ALT keys also do the same thing - delete the selection. The strange characters get inserted when I press <SHIFT>. This is using qt6, of course.
BTW, you said that you've been using Leo/Qt6 for some time. But I couldn't get it to run until I fixed qt_text. How did you manage it?
I don't know what qt_text does, really, but it's imported even though it's not in my enabled plugins list.
This behavior makes it impossible to do any editing in Leo/pyqt6.
If I rpess a modifier key in the Nav or Console panes, nothing gets inserted, but in the log pane, I get this (gotten by copy-paste from the log pane - the "ctrl" + glyphs were added when I copied the "shift" + glyphs with CNTRL-C):ctrl+ៀ?shift+ៀ?In the body pane, I get the odd glyphs but not the words "ctrl" or "shift"In a headline, I get what seem to be the same glyphs.
I'm thinking illegal o broken utf-8 byte arrays instead of strings, maybe.