Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to create .bin file?
QtWS25 Last Chance

How to create .bin file?

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 4 Posters 8.3k 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.
  • V Vijaykarthikeyan
    25 Jul 2023, 07:08

    @JonB No..just know I've gone through the Qstandard page. For the question about the data format which @jsulm asked, I've replied with the full code. need to respect his time and words. that's why.. And thank you for your suggestion that qrc is read only and directed me to go for QStandardPath.

    J Offline
    J Offline
    jsulm
    Lifetime Qt Champion
    wrote on 25 Jul 2023, 07:41 last edited by
    #13

    @Vijaykarthikeyan said in How to create .bin file?:

    I've replied with the full code

    It would be good if you would answer the questions. Also, in the code you posted I don't see anything related to writing .bin file, so no idea how that should help us...

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    V 1 Reply Last reply 25 Jul 2023, 07:52
    1
    • J JonB
      25 Jul 2023, 07:34

      @Vijaykarthikeyan
      What .xml file? There is no mention of any in your code. Nor do I know what .dat or .pak files are doing in your "exe folder".

      V Offline
      V Offline
      Vijaykarthikeyan
      wrote on 25 Jul 2023, 07:42 last edited by
      #14

      @JonB You have said to look-through Qt Resource System.In that they have mentioned .qrc file which is the .xml format where all the resource files located. That's why I have asked about it.

      J 1 Reply Last reply 25 Jul 2023, 07:44
      0
      • V Vijaykarthikeyan
        25 Jul 2023, 07:42

        @JonB You have said to look-through Qt Resource System.In that they have mentioned .qrc file which is the .xml format where all the resource files located. That's why I have asked about it.

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 25 Jul 2023, 07:44 last edited by
        #15

        @Vijaykarthikeyan said in How to create .bin file?:

        Qt Resource System.In that they have mentioned .qrc file which is the .xml format where all the resource files located.

        The resource file itself is in XML format. But there will be no such file in the build folder. Resource files are built INTO the executable (I already mentioned that in this thread). So, don't know why you expect to see any .xml files in build folder...

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • J jsulm
          25 Jul 2023, 07:41

          @Vijaykarthikeyan said in How to create .bin file?:

          I've replied with the full code

          It would be good if you would answer the questions. Also, in the code you posted I don't see anything related to writing .bin file, so no idea how that should help us...

          V Offline
          V Offline
          Vijaykarthikeyan
          wrote on 25 Jul 2023, 07:52 last edited by
          #16

          @jsulm That's where I'm getting struck. I don't know how to create it. Then,you have asked what format. I have mentioned that it's a string format

          J J 2 Replies Last reply 25 Jul 2023, 07:53
          0
          • V Vijaykarthikeyan
            25 Jul 2023, 07:52

            @jsulm That's where I'm getting struck. I don't know how to create it. Then,you have asked what format. I have mentioned that it's a string format

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 25 Jul 2023, 07:53 last edited by
            #17

            @Vijaykarthikeyan said in How to create .bin file?:

            I have mentioned that it's a string format

            So, basically a text file?
            Then what exactly is the problem?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            V 1 Reply Last reply 25 Jul 2023, 08:55
            0
            • V Vijaykarthikeyan
              25 Jul 2023, 07:52

              @jsulm That's where I'm getting struck. I don't know how to create it. Then,you have asked what format. I have mentioned that it's a string format

              J Offline
              J Offline
              JonB
              wrote on 25 Jul 2023, 07:58 last edited by
              #18

              @Vijaykarthikeyan
              It is hard to understand what your question or issue is. But again a reminder: if you are wanting to write to a log file at runtime you won't be able to use a qrc: for this, so why are we even discussing such a file?

              V 2 Replies Last reply 25 Jul 2023, 08:47
              1
              • J J.Hilk
                25 Jul 2023, 06:47

                @Vijaykarthikeyan said in How to create .bin file?:

                @JonB Yes.you are correct. Writing into other directory it works. I wonder Why?

                @JonB said in How to create .bin file?:

                they are read-only

                @Vijaykarthikeyan said in How to create .bin file?:

                Now, If I want to run my software in any other target system, it is not sure that those systems have same directory which I have coded in my file? What is the solution?

                https://doc.qt.io/qt-6/qstandardpaths.html

                V Offline
                V Offline
                Vijaykarthikeyan
                wrote on 25 Jul 2023, 08:42 last edited by
                #19

                @J-Hilk Thank you so much. Yes, it is possible through QStandardPath .

                1 Reply Last reply
                1
                • J JonB
                  25 Jul 2023, 07:58

                  @Vijaykarthikeyan
                  It is hard to understand what your question or issue is. But again a reminder: if you are wanting to write to a log file at runtime you won't be able to use a qrc: for this, so why are we even discussing such a file?

                  V Offline
                  V Offline
                  Vijaykarthikeyan
                  wrote on 25 Jul 2023, 08:47 last edited by
                  #20

                  @JonB I understand why it can't be? Again thank you for suggesting another problem which is writing a file through QStandarPath.

                  1 Reply Last reply
                  0
                  • J jsulm
                    25 Jul 2023, 07:53

                    @Vijaykarthikeyan said in How to create .bin file?:

                    I have mentioned that it's a string format

                    So, basically a text file?
                    Then what exactly is the problem?

                    V Offline
                    V Offline
                    Vijaykarthikeyan
                    wrote on 25 Jul 2023, 08:55 last edited by
                    #21

                    @jsulm I have written into the .txt format and .csv format and I had a doubt about creating .bin format. Then you all cleared my doubt it's worth nothing written into bin file. So, the problem solved and my doubt is cleared now

                    1 Reply Last reply
                    0
                    • V Vijaykarthikeyan has marked this topic as solved on 25 Jul 2023, 08:59
                    • J JonB
                      25 Jul 2023, 07:58

                      @Vijaykarthikeyan
                      It is hard to understand what your question or issue is. But again a reminder: if you are wanting to write to a log file at runtime you won't be able to use a qrc: for this, so why are we even discussing such a file?

                      V Offline
                      V Offline
                      Vijaykarthikeyan
                      wrote on 25 Jul 2023, 10:14 last edited by
                      #22

                      @JonB Thank you.. I followed QStandardPath and tested in different target systems. It is able to create and write into the files independent of directories

                      1 Reply Last reply
                      1

                      22/22

                      25 Jul 2023, 10:14

                      • Login

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