Important: Please read the Qt Code of Conduct -

what is the best way to make a ui like this?

  • link text
    link text
    the important part is the Preview Widget, which contains many small preview rect region there.and those small preview rect region can be Text, Image or Dynamic Direct3D Scene.there 3 preview styles can be dynamically changed.
    and also, i can Drag the small preview rect region to another window.
    thank you!

  • Moderators

    What do you mean the best way to make it?
    It's a toolbar with some menus, tree widget and a list widget. No philosophy there.

  • update:)

  • Moderators

    You can read about the drag and drop support in Qt here
    As for the other part you can switch the list view to IconMode. This will automatically enable drag and drop and give you the tiled look. Then you create a custom model and provide the previews as images, responding to the Qt::DecorationRole in the data memeber.

  • the most difficult point is that have to surpport Direct3D scene(not static image) in the small preview region.
    and these 3 preview styles can be changed dynamically.
    Is QGraphicsView/Scene, QGraphicsItem a good way to do this? render Direct3D in QGraphicsItem, and Text/Image also is showed in the QGraphicsItem.
    cause it is easy to scale, move, ect, the whole preview area.

Log in to reply