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]QStandardItemModel::itemChanged(QStandardItem*) signal and QAbstractScrollArea::paintEvent ( QPaintEvent * event ) function
Qt 6.11 is out! See what's new in the release blog

[SOLVED]QStandardItemModel::itemChanged(QStandardItem*) signal and QAbstractScrollArea::paintEvent ( QPaintEvent * event ) function

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 4.3k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello,

    I have a problem !
    I'm working on a QTableView, so I connected
    @void QStandardItemModel::itemChanged ( QStandardItem * item ) [signal]@

    to my own slot. But I set items in the paintEvent() method of my view, so the itemChanged() signal is emitted. That's the problem !

    So i would like to disconnect temporarly the signal and reconnect it later after the paintEvent processing.
    I know how to disconnect, I use a disconnect(model(), itemChanged(QStandardItem*), 0, 0).

    But how can I reconnect all slot to the signal after the treatment?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      You could look at "QObject::blockSignals.":/doc/qt-4.8/qobject.html#blockSignals

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Thanks you very much, it's exactly what I need !

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

          Great! Be sure and edit the thread title to add [Solved]. Thanks!

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          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