Results 1 to 4 of 4

Thread: QWidget* of createEditor

  1. #1
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QWidget* of createEditor

    Hi All,

    I was wondering whos gonna delete the QWidget* returned by,
    Qt Code:
    1. QWidget * QItemDelegate::createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const
    To copy to clipboard, switch view to plain text mode 

    baray98

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWidget* of createEditor

    i think that pointer in pointing to NULL after deletion. means function returns a null pointer after deletion. It will delete all data but pointer of no use..

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QWidget* of createEditor

    It's up to the view to release editors. Persistent editors are kept alive, temporary editors get deleted for example when they loose focus.
    J-P Nurmi

  4. #4
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWidget* of createEditor

    So i don't have to worry about managing all these customs widget popin out in my customs edit on my tree view....

    anymore stuff that i have worry about regarding implementing a custom editor?

    baray98

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.