How to realized the style of Edit Box like this picture shows.
-
Hi
so it must contain "boxes" like SOH ?
also, there will also be editable text ? or just
a collection of boxes ?
You could use a list in iconview mode to show it like that if all boxes is same size.If you need it with floating/editable text also, i think you need to specify a bit more the needed
operations on the boxes and the texts then. before i can suggest how you can make it.There is TextEdit with images but not sure what boxes can do. if it needs to popup menu and be closable
as image indicates, it might not work super. -
Hi
so it must contain "boxes" like SOH ?
also, there will also be editable text ? or just
a collection of boxes ?
You could use a list in iconview mode to show it like that if all boxes is same size.If you need it with floating/editable text also, i think you need to specify a bit more the needed
operations on the boxes and the texts then. before i can suggest how you can make it.There is TextEdit with images but not sure what boxes can do. if it needs to popup menu and be closable
as image indicates, it might not work super.@mrjj said in How to realized the style of Edit Box like this picture shows.:
Hi
so it must contain "boxes" like SOH ?
also, there will also be editable text ? or just
a collection of boxes ?
You could use a list in iconview mode to show it like that if all boxes is same size.If you need it with floating/editable text also, i think you need to specify a bit more the needed
operations on the boxes and the texts then. before i can suggest how you can make it.There is TextEdit with images but not sure what boxes can do. if it needs to popup menu and be closable
as image indicates, it might not work super.Thanks for reply.
- There will be many kinds of "boxes" not only SOH, but also have NUL ACK CR LF etc. both of them are invisible characters in ASCII table.
- One "box" is treated as one item in the edit box.
- "Box" can be delete by click x
- "Box" can be moved in edit box as an entirety.
- There will be also editable text , just like:
[SOH]hello[CR]
-
@mrjj said in How to realized the style of Edit Box like this picture shows.:
Hi
so it must contain "boxes" like SOH ?
also, there will also be editable text ? or just
a collection of boxes ?
You could use a list in iconview mode to show it like that if all boxes is same size.If you need it with floating/editable text also, i think you need to specify a bit more the needed
operations on the boxes and the texts then. before i can suggest how you can make it.There is TextEdit with images but not sure what boxes can do. if it needs to popup menu and be closable
as image indicates, it might not work super.Thanks for reply.
- There will be many kinds of "boxes" not only SOH, but also have NUL ACK CR LF etc. both of them are invisible characters in ASCII table.
- One "box" is treated as one item in the edit box.
- "Box" can be delete by click x
- "Box" can be moved in edit box as an entirety.
- There will be also editable text , just like:
[SOH]hello[CR]
@brucezcg
One option is create a custom object for TextEdit
http://doc.qt.io/qt-5/qtsvg-richtext-textobject-example.html
But im not 100% sure you can easy get click events for it.Option 2 would be a custom Widget for "Box" and QLabel with
TextInteractionFlags set to Qt::TextEditable.
And then something like a box layout to hold them.
But if you need to be able to drag them around also, it might be a bit clumsy
removing and inserting into layout.do you need rich text formatting like bold etc ?
-
@brucezcg
One option is create a custom object for TextEdit
http://doc.qt.io/qt-5/qtsvg-richtext-textobject-example.html
But im not 100% sure you can easy get click events for it.Option 2 would be a custom Widget for "Box" and QLabel with
TextInteractionFlags set to Qt::TextEditable.
And then something like a box layout to hold them.
But if you need to be able to drag them around also, it might be a bit clumsy
removing and inserting into layout.do you need rich text formatting like bold etc ?
@mrjj said in How to realized the style of Edit Box like this picture shows.:
@brucezcg
One option is create a custom object for TextEdit
http://doc.qt.io/qt-5/qtsvg-richtext-textobject-example.html
But im not 100% sure you can easy get click events for it.Option 2 would be a custom Widget for "Box" and QLabel with
TextInteractionFlags set to Qt::TextEditable.
And then something like a box layout to hold them.
But if you need to be able to drag them around also, it might be a bit clumsy
removing and inserting into layout.do you need rich text formatting like bold etc ?
Thanks, I don't need need to format the text.
As you say, this is big effort to realize what I want -
@mrjj said in How to realized the style of Edit Box like this picture shows.:
@brucezcg
One option is create a custom object for TextEdit
http://doc.qt.io/qt-5/qtsvg-richtext-textobject-example.html
But im not 100% sure you can easy get click events for it.Option 2 would be a custom Widget for "Box" and QLabel with
TextInteractionFlags set to Qt::TextEditable.
And then something like a box layout to hold them.
But if you need to be able to drag them around also, it might be a bit clumsy
removing and inserting into layout.do you need rich text formatting like bold etc ?
Thanks, I don't need need to format the text.
As you say, this is big effort to realize what I want@brucezcg
Yes, its not trivial to create due to mixed box feature and editable text.
Especially the drag around part.
I think the textobject way will work the best.
It can even drag the object but it seems to vanish bt i assume its fixable :)