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. Leaving cell and is realated signal

Leaving cell and is realated signal

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.5k 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
    m_pahlevanzadeh
    wrote on last edited by
    #1

    Dear all,

    I have QTableWidget, I fill up each cell and when i leave each cell, i need to run a slot, i need to same cellLeaved(int,int) signal but for leaving cell or finishing edit such as editFinished() i didn't find anything.

    I need help... i code pyqt.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      You might need to use the currentCellChanged() signal. Then call the slot of the previous cell.

      Greetz, Jeroen

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

        I used currentCellChanged (int,int,int,int) get the error and then used currentItemChanged (QTableWidgetItem *,QTableWidgetItem *) signal , My error is :
        ////////////////////////////////////////////
        Traceback (most recent call last):
        File "/home/mohsen/codes/amlak/amlak/src/materialsInsertFrame.py", line 254, in <lambda>
        lambda: self.materialsInstance.setFilterDict_Insert("TW",self,"imported_party_values",0,self.tableWidget.currentItem().row(),self.tableWidget.currentItem().column()))
        AttributeError: 'NoneType' object has no attribute 'row'
        ///////////////////////////////////////////

        My code is :

        ////////////////////////////////////////////////////
        QtCore.QObject.connect(self.tableWidget, QtCore.SIGNAL(_fromUtf8("currentCellChanged (int,int,int,int)")),
        lambda: self.materialsInstance.setFilterDict_Insert("TW",self,"imported_party_attributes",0,self.tableWidget.currentItem().row(),self.tableWidget.currentItem().column()))
        ////////////////////////////////////////////////////////

        1 Reply Last reply
        0
        • M Offline
          M Offline
          m_pahlevanzadeh
          wrote on last edited by
          #4

          I solved i changed my code to :

          ///////////////////
          QtCore.QObject.connect(self.tableWidget, QtCore.SIGNAL(_fromUtf8("currentCellChanged (int,int,int,int)")),
          lambda: self.materialsInstance.setFilterDict_Insert("TW",self,"imported_party_values",0,self.tableWidget.currentRow(),self.tableWidget.currentColumn()))
          ///////////////////////////////

          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