Answer the question
In order to leave comments, you need to log in
How to cross QPlainTextEdit with Model-View?
The model contains several hundred thousand elements, all presented as text with markup (color, style). I want to make a View that will display this data. From Model-View, the indexAt() functionality is absolutely necessary - getting the index in the model by the coordinates on the screen, so that the user double-clicks on a line of text to cause, for example, data modification in the model. From QPlainTextEdit you need character-by-character selection of text and display of text in different colors.
QPlainTextEdit in its purest form holds hundreds of thousands of lines, but does not have all the functionality.
Inheritance from QAbstractItemView turns out crooked for me: scrolling slows down already on 10K elements, plus there are no examples for displaying text.
Googled as best I could - I did not find examples of this with the source code.
Tell me how to do what you want?
Answer the question
In order to leave comments, you need to log in
In general, the project https://code.google.com/p/qhexedit2/ contains a suitable rendering of text in paintEvent, which can be taken as a basis.
Either put it in a QTableView with a custom design, or create your own widget. What is the nature of the data in the model? Any log?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question