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. What's the best way to detect a change on dialog to show MODIFIED on the title?
Forum Updated to NodeBB v4.3 + New Features

What's the best way to detect a change on dialog to show MODIFIED on the title?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 588 Views 2 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.
  • K Offline
    K Offline
    ki John
    wrote on last edited by ki John
    #1

    When the user edits data on a QDialog with lot's of controls, like QLineEdit, QComboboxes, etc. I want to notice if at least one of them has changed by the user not by the program.

    Which events notify of user change the data with a keyboard or mouse? Because I want to show a grayed out save button, but when a user changes something I want to enable the save button.

    Right now when loading the data onto the controls it is sending out change notifications. I don't need that. I need the change notification when the user changes the data.

    Thanks

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      For QLineEdit, you have the editingFinished() and textEdited() signals. I don't think there's anything similar for QComboBox.

      @ki-John said:

      Right now when loading the data onto the controls it is sending out change notifications. I don't need that. I need the change notification when the user changes the data.

      As a workaround, you can call QObject::blockSignals() first, then load the values, then unblock the signals again.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      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