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. Cant change cell data one below cell
Forum Updated to NodeBB v4.3 + New Features

Cant change cell data one below cell

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 2 Posters 2.9k 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.
  • JonBJ JonB

    @hubeytqew
    So are you saying your setData()s now work OK?

    What is the difference between object of QTableWidget/QTableView and only ui->tableWidget ?

    QTableView provides the base functionality for binding to a data model and showing/editing its content in rows and columns of cells.

    QTableWidget is derived from QTableView, so it starts out with all that class's functionality. Principally it then adds it its own data model, so you don't have to create one, and it also adds an "item based approach" to adding data.

    QTableWidget is easiest for beginners as it is self-contained, you don't have to understand about models to use it. But as soon as you have/want your own model, or want to use a SQL database for the model, you want QTableView.

    Your ui->tableWidget is presumably a QTableWidget you have created in Designer.

    H Offline
    H Offline
    hubeytqew
    wrote on last edited by
    #21

    @JonB

    @JonB said in Cant change cell data one below cell:

    @hubeytqew
    So are you saying your setData()s now work OK?

    No, its not :D As I said before; I leaved this solution, I tried another approach to do table of decrypted values. I fetch values from database, decrypt it, create new table with these decrypted values. So, the table is now same with the database but values are decrypted.

    In this approach, I tried to created QTableWidget/View objects to use but I couldnt with these objects. Then I found/remembered, the solution was using ui->tableWidget->.. to show the table.

    Thank you for your patience and good answers..Appreciate it!

    JonBJ 1 Reply Last reply
    0
    • H hubeytqew

      @JonB

      @JonB said in Cant change cell data one below cell:

      @hubeytqew
      So are you saying your setData()s now work OK?

      No, its not :D As I said before; I leaved this solution, I tried another approach to do table of decrypted values. I fetch values from database, decrypt it, create new table with these decrypted values. So, the table is now same with the database but values are decrypted.

      In this approach, I tried to created QTableWidget/View objects to use but I couldnt with these objects. Then I found/remembered, the solution was using ui->tableWidget->.. to show the table.

      Thank you for your patience and good answers..Appreciate it!

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

      @hubeytqew
      I have to leave you to it. We have shown your table view/model have no problem calling setData() for simple values like text. The only difference seems to be whatever your instance1.decrypt_it() does with the encrypted string you hand it and what it returns into decrypted. I don't have your data.

      1 Reply Last reply
      1

      • Login

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