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. QUndoView, how to know if the user clicked? it seems QAbstractItemView::clicked is not emitted :'(

QUndoView, how to know if the user clicked? it seems QAbstractItemView::clicked is not emitted :'(

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 289 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.
  • mbruelM Offline
    mbruelM Offline
    mbruel
    wrote on last edited by
    #1

    Hello,
    I'm having an issue to know when the user of my app is clicking on the UndoView.
    I would like to refresh my HMI when he does it.

    The only place I've found so far would be to connect to QUndoStack::indexChanged but this doesn't go with what I want.

    My app has a QGraphicsScene. When some stuff happens I fill the UndoStack BUT I don't want to refresh the scene.

    I want to refresh it only on Undo/Redo and on a click on the UndoView.

    It's easy to refresh when the user click on some Undo/Redo buttons but I don't find a way to intercept a click on the QUndoView.

    Any ideas?
    Cheers

    1 Reply Last reply
    0
    • mbruelM Offline
      mbruelM Offline
      mbruel
      wrote on last edited by
      #2

      on Linux 64bits, Qt.5.11.3, it seems that we need to click twice to have the signal QAbstractItemView::clicked.
      First the new index is selected, then we have to click again to send the signal... Same with QAbstractItemView::activated

      QAbstractItemView::pressed makes the job! Problem solved

      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