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. [SOLVED]Current record from QSqlQueryModel
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Current record from QSqlQueryModel

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.6k 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.
  • M Offline
    M Offline
    mbnoimi
    wrote on last edited by
    #1

    How can I get current QSqlRecord from QSqlQueryModel?

    P.S. I attached QSqlQueryModel to QTableView

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SergioDanielG
      wrote on last edited by
      #2

      HI mbnoimi.
      Maybe it's not that you need, but did you see "QSqlQueryModel::record(int row)":http://qt-project.org/doc/qt-5.0/qtsql/qsqlquerymodel.html#record

      Regards.

      www.ftatv.com.ar El foro argentino de la TV libre

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mbnoimi
        wrote on last edited by
        #3

        [quote author="SergioDanielG" date="1373664056"]Maybe it's not that you need, but did you see "QSqlQueryModel::record(int row)":http://qt-project.org/doc/qt-5.0/qtsql/qsqlquerymodel.html#record[/quote]

        Sure it doesn't work because current row is unknown!

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qxoz
          wrote on last edited by
          #4

          What about:
          @QSqlQueryModel::record(QTableView::currentIndex().row())@

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbnoimi
            wrote on last edited by
            #5

            [quote author="qxoz" date="1373972086"]What about:
            @QSqlQueryModel::record(QTableView::currentIndex().row())@[/quote]

            Thanks I found out the solution but I forgot to update the thread.

            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