Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved How can I create a nice table to show data in qt with css?

    General and Desktop
    3
    5
    652
    Loading More Posts
    • 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.
    • MhM93
      MhM93 last edited by

      I want to create a table like this image in qt:alt text
      How to do that?

      H.Ghassami

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        Hi
        Same way as this poster.
        https://forum.qt.io/topic/73605/custom-list-view

        What solution is the best, also depends on how many row you must handle.
        The cleanest and most solid is using Delegates but its also the most complicated.

        I do not think its possible to make such list using css for widgets :)

        1 Reply Last reply Reply Quote 1
        • MhM93
          MhM93 last edited by

          I do not think its possible to make such list using css for widgets :)

          really?? :o
          :(

          H.Ghassami

          mrjj uralbash 2 Replies Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @MhM93 last edited by

            @MhM93
            Well Delegates are designed for that. while you most likely can get it too look like
            that with css
            editing and clicking might not be what you want.

            If you dont need to have many, u can cheat as discussed in
            https://forum.qt.io/topic/73605/custom-list-view

            1 Reply Last reply Reply Quote 0
            • uralbash
              uralbash @MhM93 last edited by

              @MhM93 as far as I know CSS was invented as an additional technology that fix HTML, because HTML have not ideal architecture. QML initially made without these drawbacks, due to the inheritance styles of parent components and reactive components architecture. Therefore you shouldn't use CSS in QML.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post