Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Italian
  4. Popolamento QTableWidget
Qt 6.11 is out! See what's new in the release blog

Popolamento QTableWidget

Scheduled Pinned Locked Moved Solved Italian
4 Posts 2 Posters 1.3k Views
  • 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.
  • PollyP Offline
    PollyP Offline
    Polly
    wrote on last edited by
    #1

    Salve ho cercato in lungo e in largo sul web su come popolare una QTableWidget dopo che ho eseguito una query.
    La domanda è come posso prendere dalla Query (QSqlQuery) i risultati e inserirli nella QTableWidget?

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      Ti basta separare model e view.
      Invece di usare QTableWidget usa QTableView. poi crea un QSqlQueryModel e impostalo come sorgente per la view. super semplice

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • PollyP Offline
        PollyP Offline
        Polly
        wrote on last edited by
        #3

        perfetto più tardi la provo

        1 Reply Last reply
        0
        • PollyP Offline
          PollyP Offline
          Polly
          wrote on last edited by
          #4

          Riuscito perfettamente . GRasssssieeeee

          1 Reply Last reply
          0

          • Login

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