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. Operations in a QTablewidget

Operations in a QTablewidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 575 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.
  • Y Offline
    Y Offline
    YassineKira
    wrote on last edited by
    #1

    Hello,

    i am trying to do some operations (multiplication, addition) to some prices to have a bill in QTablewidget, i ask you to if this is the best way to do that or i can find better ??

    Thanks you in advance.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      A QTableWidget could be fine for a simple bill.
      Do you need to also print it ?

      Y 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        A QTableWidget could be fine for a simple bill.
        Do you need to also print it ?

        Y Offline
        Y Offline
        YassineKira
        wrote on last edited by YassineKira
        #3

        @mrjj i want explore to excel file

        mrjjM 1 Reply Last reply
        0
        • Y YassineKira

          @mrjj i want explore to excel file

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @YassineKira
          hi
          well Excel can read a CSV file so you can export it to that very easy format.
          That is easy to code.

          if you need to directly write to a native excel file you can look into
          https://github.com/QtExcel

          Y 1 Reply Last reply
          0
          • mrjjM mrjj

            @YassineKira
            hi
            well Excel can read a CSV file so you can export it to that very easy format.
            That is easy to code.

            if you need to directly write to a native excel file you can look into
            https://github.com/QtExcel

            Y Offline
            Y Offline
            YassineKira
            wrote on last edited by
            #5

            @mrjj Thanks, how is better qtablewidget or qtableview for my problem ?

            mrjjM 1 Reply Last reply
            0
            • Y YassineKira

              @mrjj Thanks, how is better qtablewidget or qtableview for my problem ?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @YassineKira
              hi
              Both can be used. Its mostly the same excecpt qtablewidget has its own internal model it uses where as qtableview wants you to create your own model.
              If you need to share the data between more than just the qtablewidget, then the
              view version is better but else the qtablewidget will do fine.

              1 Reply Last reply
              2

              • Login

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