I am trying to create something similar to this in PyQt5: https://www.screencast.com/t/1FikGosKbS
I tried using a separate QTextEdit widget for each bullet point and overriding the enter key to go to the next textbox, but I don't know how to make multiple QTextEdit widgets selectable (and able to copy paste) like in the example.
How can I allow the user to drag to select text across multiple QTextEdit boxes? Or is there a better approach to this?
I don't know this application is made from Qt or not,but I have an idea. Parhaps you might have made the most part of this application... I can't know them from your question.I write my opinion on the premise that you don't know QText handling at all.
QTextEdit
,QTextDocument
,QTextCursor
are used fully.
1.To understand block.
2.To use QTextBlockUserData
(If you want.)
3.To use QGraphicsItem
as nodes.
4.To go other page,we add a new QTextEdit
on QStackedWidget
or replace the QTextDocument
of QTextEdit
.
5.To make sub-nodes block,you can coordinate the indentation of blocks.
QTextBlock
is a read-only data in a document.
You make QTextBlockUserData
and set it to the block.
If you select multiple blocks you want to drag & drop , you use QTextCursor
and movePosition
methods with sequence.
The nodes of this application can not be QTextListFormat
,because we cannot handle mouse click on the style.But you can insert empty-style QTextListFormat
.
The truth of the nodes may be QGraphicsItem
.
You can allocate it each the start position of blocks and the item can also have the block data.
It will difficult to take care of the connection between the nodes and the blocks.
In advance, you must set QGraphicsView
& QGraphicsScene
.
I insert many data on the container.
Which should we control with nodes or block?
My trial.
My trial is incomplete,but it will be completed with endurance. Logically,I think I can go step until the good point with these combinations. But it will be diffcult...
These nodes are made from QGraphicsItem and allocated each Blocks. You must calculate the position and recalculate during editing.
The mouse cursor image is deleted on these images. It is outrange of screenshot.