Results 1 to 3 of 3

Thread: Storing/Reading item creation date

  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Storing/Reading item creation date

    Hi guys,

    I would like to ask about few things connected with QGraphicsItems:

    1. How to read/store (date & time) about item creation?
    2. When serializing should date and time parts be store separately? Can I store the whole date/time somehow?
    3. Can I add an additional property(If can't get date/time of item creation) and store item creation date/time?

    Thanks for any help

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Storing/Reading item creation date

    You will have to subclass QGraphicsItem and add all the fields you want. Also you will have to do the serialization yourself.

  3. #3
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Wink Re: Storing/Reading item creation date

    Hi,

    Ok, simple as that, yet I hoped there were some properties to cover that.

    Thanks for help.

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

Similar Threads

  1. Item Delegate Painting
    By stevey in forum Qt Programming
    Replies: 3
    Last Post: 9th May 2008, 07:37
  2. How to sort the treeWidget item according to size and date
    By santosh.kumar in forum Qt Programming
    Replies: 3
    Last Post: 23rd October 2007, 10:32
  3. How to set Creation date for file...
    By santosh.kumar in forum Qt Programming
    Replies: 10
    Last Post: 12th October 2007, 17:50
  4. Localizing date times in item views
    By jpn in forum Qt Programming
    Replies: 6
    Last Post: 6th February 2007, 14:47

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.