Results 1 to 2 of 2

Thread: QStandarItem clean data

  1. #1
    Join Date
    Feb 2014
    Posts
    94
    Thanks
    5
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QStandarItem clean data

    Hello!

    I have a QStabdardItemModel and I need to clear the data of one cell but dont remove the row

    I am trying this but its not working

    Qt Code:
    1. modeloLancamentosAmortizacao->data(modeloLancamentosAmortizacao->index(0,2)).clear();
    To copy to clipboard, switch view to plain text mode 

    this way does not work either

    Qt Code:
    1. QStandardItem *item = modeloLancamentosAmortizacao->item(0,2);
    2. item->data().clear();
    To copy to clipboard, switch view to plain text mode 

    How can I do that?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QStandarItem clean data

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. A problem about "undefined reference to `Clean::Clean(QObject*)'
    By GeorgeDao123 in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 10th February 2013, 10:36
  2. how to clean data in qimage with transparent?
    By rolandsun in forum Qt Programming
    Replies: 7
    Last Post: 13th June 2012, 04:40
  3. how do I clean QT? (Before rebuilding it)
    By gilamran in forum Qt Programming
    Replies: 7
    Last Post: 21st December 2010, 10:16
  4. clean solution?
    By Dumbledore in forum Qt Programming
    Replies: 5
    Last Post: 30th October 2007, 01:44
  5. Downloading from a clean url
    By travlr in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2007, 22:55

Tags for this Thread

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.