Results 1 to 3 of 3

Thread: Qt Property Browser Framework - Redo/Undo

  1. #1
    Join Date
    Nov 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt Property Browser Framework - Redo/Undo

    Hi I'm using qtpropertybrowser with a custom redo/undo system (which is for a multi-process system) and I'm having a problem trying to emulate undoing like the the property editor in Qt Designer where input widgets such as QLineEdit/Q(Double)SpinBox when you undo the value reverts to the to the very first value it was before making the modification. For example if you modify a QLineEdit (in the Designer Property Editor) with this sequence of inputs 'a','b','c' press enter or lose focus then press ctrl-z the undo operation deletes "abc" as a whole and not just the last character 'c'.

    I'm guessing in the case of designer's property editor it is using qt's redo/undo framework and using the QUndoCommand::mergeWith method to merge multiple commands into one and hooking up events like QLineEdit's "editingFinished" to be able to do those block undo/redos.

    I can't seem to find a workaround to do this with the property browser because the Property Manager only has propertyChanged/valueChanged events but nothing like QLineEdit/QSpinBox's "editingFinished" events which could help me to write a more useful undo/redo for string input.

    Does anyone have any ideas as to how I can achieve this without modifying the original source of the property browser framework? If not I'm planning on adding another event to the property manager called something like valueChanging.

  2. #2
    Join Date
    Nov 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Property Browser Framework - Redo/Undo

    Bumping this up, please let me know if you're unclear with what I wrote.

  3. #3
    Join Date
    Nov 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Property Browser Framework - Redo/Undo

    one more time.

Similar Threads

  1. Compilation of QT Property Browser
    By yccheok in forum Qt Programming
    Replies: 7
    Last Post: 28th July 2010, 23:39
  2. Realisation of Property Editor (Browser) in Qt Jambi
    By Pavka in forum Qt Programming
    Replies: 0
    Last Post: 30th January 2009, 07:11
  3. Adding property editor file browser popup...
    By thawkins in forum Qt Tools
    Replies: 1
    Last Post: 25th April 2007, 23:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.