Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to implement this UI with QT?
Forum Updated to NodeBB v4.3 + New Features

How to implement this UI with QT?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 383 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Skipper
    wrote on 23 Dec 2018, 15:47 last edited by
    #1

    I'm a qt beginner.I believe qt have great energy.So I want to know how to implement a UI just like the image below:
    0_1545580045908_IMG_20181223_234222.png

    (I wrote this with JavaFx)
    I want to know tow things here:
    One is how QT implement a component may contains several other widget such like a icon,a string and a layout.As shown in the diagram. And at the same time ,this component may also contained by other containers (as a item) like QListView. It really like a nesting of div in front end.
    Another is how to implement the frosted glass effect?

    I believe qt can do that effortlessly.I need some guide and ideas.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 23 Dec 2018, 16:25 last edited by
      #2

      Hi
      For views ( ListView/Treeview etc and also the ListWidgets etc )
      the best way is QStyledItemDelegate.
      http://doc.qt.io/qt-5/model-view-programming.html
      ( Delegates section )
      They allow any type of custom editing and painting with good
      performance and model integration.

      Example of special edit one.
      http://doc.qt.io/qt-5/qtwidgets-itemviews-stardelegate-example.html

      If you search the user @VRonin posts, you will find many examples of
      delegates for comboboxes and buttons.


      The other option is setCellWidget that
      allows to set a complete widget to a cell. ( including sub widgets )
      http://doc.qt.io/qt-5/qtablewidget.html#setCellWidget
      However, this suffer from bad performance if the list is big and integrate poorly with the model. ( all editing is must be manually synced )

      Regarding the frosted effect.
      Its very hard to make in any crossplatform way fi you need the actual window to be like that.

      1 Reply Last reply
      5

      2/2

      23 Dec 2018, 16:25

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved