Unsolved QTextCharFormat tooltip
-
I don't really understand how it should work
Here's my code:for name, values in self.regex.items(): self.formats[name] = QTextCharFormat() if name == "class": self.formats[name].setFontWeight(QFont.Bold) elif name == "function": self.formats[name].setFontItalic(True) elif name == "magic": self.formats[name].setFontItalic(True) elif name == "F_bool": self.formats[name].setToolTip("Hello world!"
F_bool is a QTextCharFormat which matches the word "False" in my editor.
When hovering over the word in the editor, is it supposed to show a tooltip?
Because it isn't showing anything right now. -
Hi,
What version of PyQt are you using ?
On what platform ?
Can you please provide a complete python example to test that ? -
I'm using PyQt5 and I'm on Linux.
I have a QPlainTextEdit which has a syntax highlighter on it and after searching google I found this stackoverflow question which is pretty recent:
I will give a working example that you can test tomorrow!
-
What is the exact version of PyQt 5 that you are using ?
Also, how did you installed it ?