Results 1 to 7 of 7

Thread: How to format QDate in QTableWidgetWiev

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    Kranj, Slovenia
    Posts
    25
    Thanks
    10
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question How to format QDate in QTableWidgetWiev

    Hi;

    I have QTableWidgetView that displays data from database. I have enabled sorting the data by columns (clicking on the header row). I have solved the problem of integers and date data with QTableWidgetItem::setData(Qt::DisplayRole, int) and QTableWidgetItem::setData(Qt::DisplayRole, QDate). That works perfectly but date is displayed in format "d MMM yyyy" while I need it in "dd'.'MM'.'yyyy" or similar format. Is it possible and how?

    Regards; Luka
    Last edited by omci; 12th April 2012 at 17:33. Reason: reformatted to look better

Similar Threads

  1. Best way to represent struct using Qt containers
    By rajil.s in forum Qt Programming
    Replies: 2
    Last Post: 25th January 2012, 18:30
  2. What do pointer values actually represent?
    By hackerNovitiate in forum General Programming
    Replies: 2
    Last Post: 26th February 2011, 21:57
  3. Represent a bit vector
    By danilodsp in forum Newbie
    Replies: 3
    Last Post: 20th October 2010, 16:10
  4. represent svg in tab view
    By Dilshad in forum Newbie
    Replies: 5
    Last Post: 27th July 2010, 09:47
  5. how to represent a graph?
    By harakiri in forum Qt Programming
    Replies: 2
    Last Post: 4th August 2009, 14:37

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.