Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved]Why QFileInfo.created(); is invalid in Android?
QtWS25 Last Chance

[solved]Why QFileInfo.created(); is invalid in Android?

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BBFAG3
    wrote on last edited by
    #1

    This function return a invalid QDateTime.

    Is there some other way to solve this?
    Thanks a lot!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you provide an minimal example that helps test this behavior ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BBFAG3
        wrote on last edited by
        #3

        I use QFileInfo temp(dir,filename) set file path to QfileInfo,then QFileinfoList.append(temp) to make a list of my file. When I try to output QFileInfo.created() by qDebug, It show me "QDateTime(" Qt::LocalTime")"...(isValid return false)But if I used .fileName is work.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BBFAG3
          wrote on last edited by
          #4

          I work it out myself.. It doesn't work because I usd a QStringList as file list and use QFileInfo.setPath() to get the file info

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Nice you found out and thanks for sharing.

            Can you also please update the thread title prepending [solved] so other forum users may know a solution has been found :)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved