Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Spanish
  4. sqlite y qtable
Forum Updated to NodeBB v4.3 + New Features

sqlite y qtable

Scheduled Pinned Locked Moved Unsolved Spanish
5 Posts 5 Posters 1.2k 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.
  • C Offline
    C Offline
    Casino
    wrote on last edited by
    #1

    cómo refrecar la qtablewidget conectada a la db sqlite una vez introducida una actualización???
    No puedo estar cerrando y abriendo permanentemente.-Gracias.

    JonBJ 1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Please write in english or in the spanish subforum.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • C Casino

        cómo refrecar la qtablewidget conectada a la db sqlite una vez introducida una actualización???
        No puedo estar cerrando y abriendo permanentemente.-Gracias.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Casino said in sqlite y qtable:

        qtablewidget conectada a la db sqlite

        You should not be using a QTableWidget with a database (SQLite). Use a QTableView instead.

        1 Reply Last reply
        2
        • lincolnL Offline
          lincolnL Offline
          lincoln
          wrote on last edited by
          #4

          debes usar QTableView y QSqlTableModel en lugar de QTableWidget, asignas el modelo con el metodo setModel() del QTableView, y para refrescar los datos llamas al metodo select() del QSqlTableModel.

          Solitary wolf

          1 Reply Last reply
          0
          • juankiJ Offline
            juankiJ Offline
            juanki
            Moderators
            wrote on last edited by
            #5

            Hola

            En la documentación tienes un ejemplo de uso:

            https://doc.qt.io/qt-5/qsqltablemodel.html#details
            https://doc.qt.io/qt-5/qsqlquerymodel.html
            https://doc.qt.io/qt-5/qtableview.html

            Dale un vistazo. Un saludo

            Intenta explicar el problema lo más claro y detallado posible. Adjunta los errores y el código que creas da el error.
            Procura escribir correctamente y sin faltas de ortografía.

            Si la duda se solucionó, por favor, marca el tema como 'solucionado'.

            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