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. Bind different files program Qt
Forum Update on Monday, May 27th 2025

Bind different files program Qt

Scheduled Pinned Locked Moved General and Desktop
18 Posts 3 Posters 3.7k 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.
  • RIVOPICOR Offline
    RIVOPICOR Offline
    RIVOPICO
    wrote on last edited by RIVOPICO
    #1

    Hi i'm trying to bind different files in one with Qt. Why? Because it's more comfortable to have in one single file and when i want to open i open all.
    But my problem is when i bind all files in one and change the resources of this one (the other's are corrupted). In other words, for example i change the icon in the output file(archivosalida) the other files are corrupted. So i was thinking to include my stub like resource because in my stub i add the other file's(all data) and their resources. So if i add my stub like resource when i change the icon in my single file, the resources of other's will not change. But i'm not sure if i can. I put the source of what things i'm trying.

    Binder:

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <QFileDialog>
    #include <QFile>
    #include <QTextStream>
    
    MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
        connect (ui->botonExaminar1,SIGNAL(clicked()),this,SLOT(examinar1()));
        connect (ui->botonExaminar2,SIGNAL(clicked()),this,SLOT(examinar2()));
        connect (ui->botonUnir,SIGNAL(clicked()),this,SLOT(juntar()));
    }
    
    MainWindow::~MainWindow()
    {
        delete ui;
    }
    
    void MainWindow::examinar1()
    {
        ui->ejecutable1Texto->setText(QFileDialog::getOpenFileName(this,"Abrir archivo"));
    }
    void MainWindow::examinar2()
    {
        ui->ejecutable2Texto->setText(QFileDialog::getOpenFileName(this,"Abrir archivo"));
    }
    void MainWindow::juntar()
    {
        /** función para juntar los dos ejecutables **/
    
        /* declaraciones */
        QFile archivoSalida;
        QFile *archivoEjecutable1;
        QFile *archivoEjecutable2;
        QFile *archivoStub;
        QByteArray tamano1;
        QByteArray tamano2;
        QByteArray tamano3;
        QByteArray trama(1024,'0');
        QString nombreEjecutable1;
        QString nombreEjecutable2;
    
        /* inicializaciones */
        archivoEjecutable1 = new QFile();
        archivoEjecutable2 = new QFile();
        archivoStub = new QFile();
    
        /* establecer nombres de los ficheros */
        archivoSalida.setFileName(QFileDialog::getSaveFileName(this,"Archivo de salida"));
        archivoEjecutable1->setFileName(ui->ejecutable1Texto->text());
        archivoEjecutable2->setFileName(ui->ejecutable2Texto->text());
        archivoStub->setFileName("./stubb.dat");
    
        /* abrir ficheros */
        archivoSalida.open(QFile::WriteOnly);
        archivoEjecutable1->open(QFile::ReadOnly);
        archivoEjecutable2->open(QFile::ReadOnly);
        archivoStub->open(QFile::ReadOnly);
    
        /* escribir en el fichero de salida los tres ejecutables */
        archivoSalida.write(archivoStub->readAll() + archivoEjecutable1->readAll() + archivoEjecutable2->readAll());
    
        /* Convertir los tamaños a QString */
        tamano1.setNum(archivoStub->size());
        tamano2.setNum(archivoEjecutable1->size());
        tamano3.setNum(archivoEjecutable2->size());
    
        /* Cojer los nombres de los ejecutables */
        nombreEjecutable1 = archivoEjecutable1->fileName().split(QDir::separator()).last();
        nombreEjecutable2 = archivoEjecutable2->fileName().split(QDir::separator()).last();
    
        /* Crear la trama de datos */
        trama = tamano1 + "|@|" + tamano2 + "|@|" + tamano3 + "|@|" + nombreEjecutable1.toLatin1() + "|@|" + nombreEjecutable2.toLatin1();
        /* Escribir la trama en los últimos 1024 bytes del archivo de salida */
        archivoSalida.write(trama,1024);
    
        /* Cerrar todos los ficheros */
        archivoEjecutable1->close();
        archivoEjecutable2->close();
        archivoStub->close();
    }
    

    My Stub to run my other files in one.

    #include "widget.h"
    #include "ui_widget.h"
    #include <QFile>
    #include <QDir>
    #include <QProcess>
    
    Widget::Widget(QWidget *parent) :
        QWidget(parent),
        ui(new Ui::Widget)
    {
        ui->setupUi(this);
        QDir directorio;
        QFile *archivoStub;
        QFile *archivoEjecutable1;
        QFile *archivoEjecutable2;
        QString trama;
        QString tamano1;
        QString tamano2;
        QString tamano3;
        QString nombre1;
        QString nombre2;
        archivoStub = new QFile();
        archivoEjecutable1 = new QFile();
        archivoEjecutable2 = new QFile();
        archivoStub->setFileName(QApplication::applicationFilePath());
     QFileInfo info1(QApplication::applicationFilePath());
     QString fileName=info1.fileName();
        archivoStub->open(QFile::ReadOnly);
        archivoStub->seek(archivoStub->size() - 1024);
        trama = archivoStub->read(1024);
        tamano1 = trama.split("|@|")[0];
        tamano2 = trama.split("|@|")[1];
        tamano3 = trama.split("|@|")[2];
        nombre1 = trama.split("|@|")[3];
        nombre2 = trama.split("|@|")[4];
    
        archivoEjecutable1->setFileName(directorio.tempPath() + "/" + nombre1);
        archivoEjecutable1->open(QFile::WriteOnly);
        archivoStub->seek(tamano1.toInt());
        archivoEjecutable1->write(archivoStub->read(tamano2.toInt()));
        archivoEjecutable1->close();
        QProcess::startDetached(directorio.tempPath() + "/" + nombre1);
    
        archivoEjecutable2->setFileName(directorio.tempPath() + "/" + nombre2);
        archivoEjecutable2->open(QFile::WriteOnly);
        archivoStub->seek(tamano1.toInt() + tamano2.toInt());
        archivoEjecutable2->write(archivoStub->read(tamano3.toInt()));
        archivoEjecutable2->close();
        QProcess::startDetached(directorio.tempPath() + "/" + nombre2);
     QProcess process;
     process.start("taskkill /f /im "+fileName);
     process.waitForFinished();
        process.waitForReadyRead();
        qDebug("test");
        QCoreApplication::quit();
    }
    
    Widget::~Widget()
    {
        delete ui;
    }
    

    My question how i can avoid that i change resources of my other's file or my stub to let me change the resources in my single file( the file with all my application's).

    jsulmJ 1 Reply Last reply
    0
    • RIVOPICOR RIVOPICO

      Hi i'm trying to bind different files in one with Qt. Why? Because it's more comfortable to have in one single file and when i want to open i open all.
      But my problem is when i bind all files in one and change the resources of this one (the other's are corrupted). In other words, for example i change the icon in the output file(archivosalida) the other files are corrupted. So i was thinking to include my stub like resource because in my stub i add the other file's(all data) and their resources. So if i add my stub like resource when i change the icon in my single file, the resources of other's will not change. But i'm not sure if i can. I put the source of what things i'm trying.

      Binder:

      #include "mainwindow.h"
      #include "ui_mainwindow.h"
      #include <QFileDialog>
      #include <QFile>
      #include <QTextStream>
      
      MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
      {
          ui->setupUi(this);
          connect (ui->botonExaminar1,SIGNAL(clicked()),this,SLOT(examinar1()));
          connect (ui->botonExaminar2,SIGNAL(clicked()),this,SLOT(examinar2()));
          connect (ui->botonUnir,SIGNAL(clicked()),this,SLOT(juntar()));
      }
      
      MainWindow::~MainWindow()
      {
          delete ui;
      }
      
      void MainWindow::examinar1()
      {
          ui->ejecutable1Texto->setText(QFileDialog::getOpenFileName(this,"Abrir archivo"));
      }
      void MainWindow::examinar2()
      {
          ui->ejecutable2Texto->setText(QFileDialog::getOpenFileName(this,"Abrir archivo"));
      }
      void MainWindow::juntar()
      {
          /** función para juntar los dos ejecutables **/
      
          /* declaraciones */
          QFile archivoSalida;
          QFile *archivoEjecutable1;
          QFile *archivoEjecutable2;
          QFile *archivoStub;
          QByteArray tamano1;
          QByteArray tamano2;
          QByteArray tamano3;
          QByteArray trama(1024,'0');
          QString nombreEjecutable1;
          QString nombreEjecutable2;
      
          /* inicializaciones */
          archivoEjecutable1 = new QFile();
          archivoEjecutable2 = new QFile();
          archivoStub = new QFile();
      
          /* establecer nombres de los ficheros */
          archivoSalida.setFileName(QFileDialog::getSaveFileName(this,"Archivo de salida"));
          archivoEjecutable1->setFileName(ui->ejecutable1Texto->text());
          archivoEjecutable2->setFileName(ui->ejecutable2Texto->text());
          archivoStub->setFileName("./stubb.dat");
      
          /* abrir ficheros */
          archivoSalida.open(QFile::WriteOnly);
          archivoEjecutable1->open(QFile::ReadOnly);
          archivoEjecutable2->open(QFile::ReadOnly);
          archivoStub->open(QFile::ReadOnly);
      
          /* escribir en el fichero de salida los tres ejecutables */
          archivoSalida.write(archivoStub->readAll() + archivoEjecutable1->readAll() + archivoEjecutable2->readAll());
      
          /* Convertir los tamaños a QString */
          tamano1.setNum(archivoStub->size());
          tamano2.setNum(archivoEjecutable1->size());
          tamano3.setNum(archivoEjecutable2->size());
      
          /* Cojer los nombres de los ejecutables */
          nombreEjecutable1 = archivoEjecutable1->fileName().split(QDir::separator()).last();
          nombreEjecutable2 = archivoEjecutable2->fileName().split(QDir::separator()).last();
      
          /* Crear la trama de datos */
          trama = tamano1 + "|@|" + tamano2 + "|@|" + tamano3 + "|@|" + nombreEjecutable1.toLatin1() + "|@|" + nombreEjecutable2.toLatin1();
          /* Escribir la trama en los últimos 1024 bytes del archivo de salida */
          archivoSalida.write(trama,1024);
      
          /* Cerrar todos los ficheros */
          archivoEjecutable1->close();
          archivoEjecutable2->close();
          archivoStub->close();
      }
      

      My Stub to run my other files in one.

      #include "widget.h"
      #include "ui_widget.h"
      #include <QFile>
      #include <QDir>
      #include <QProcess>
      
      Widget::Widget(QWidget *parent) :
          QWidget(parent),
          ui(new Ui::Widget)
      {
          ui->setupUi(this);
          QDir directorio;
          QFile *archivoStub;
          QFile *archivoEjecutable1;
          QFile *archivoEjecutable2;
          QString trama;
          QString tamano1;
          QString tamano2;
          QString tamano3;
          QString nombre1;
          QString nombre2;
          archivoStub = new QFile();
          archivoEjecutable1 = new QFile();
          archivoEjecutable2 = new QFile();
          archivoStub->setFileName(QApplication::applicationFilePath());
       QFileInfo info1(QApplication::applicationFilePath());
       QString fileName=info1.fileName();
          archivoStub->open(QFile::ReadOnly);
          archivoStub->seek(archivoStub->size() - 1024);
          trama = archivoStub->read(1024);
          tamano1 = trama.split("|@|")[0];
          tamano2 = trama.split("|@|")[1];
          tamano3 = trama.split("|@|")[2];
          nombre1 = trama.split("|@|")[3];
          nombre2 = trama.split("|@|")[4];
      
          archivoEjecutable1->setFileName(directorio.tempPath() + "/" + nombre1);
          archivoEjecutable1->open(QFile::WriteOnly);
          archivoStub->seek(tamano1.toInt());
          archivoEjecutable1->write(archivoStub->read(tamano2.toInt()));
          archivoEjecutable1->close();
          QProcess::startDetached(directorio.tempPath() + "/" + nombre1);
      
          archivoEjecutable2->setFileName(directorio.tempPath() + "/" + nombre2);
          archivoEjecutable2->open(QFile::WriteOnly);
          archivoStub->seek(tamano1.toInt() + tamano2.toInt());
          archivoEjecutable2->write(archivoStub->read(tamano3.toInt()));
          archivoEjecutable2->close();
          QProcess::startDetached(directorio.tempPath() + "/" + nombre2);
       QProcess process;
       process.start("taskkill /f /im "+fileName);
       process.waitForFinished();
          process.waitForReadyRead();
          qDebug("test");
          QCoreApplication::quit();
      }
      
      Widget::~Widget()
      {
          delete ui;
      }
      

      My question how i can avoid that i change resources of my other's file or my stub to let me change the resources in my single file( the file with all my application's).

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @RIVOPICO Are you sure "trama" does not contain more than 1024 bytes?

      /* Crear la trama de datos */
          trama = tamano1 + "|@|" + tamano2 + "|@|" + tamano3 + "|@|" + nombreEjecutable1.toLatin1() + "|@|" + nombreEjecutable2.toLatin1();
          /* Escribir la trama en los últimos 1024 bytes del archivo de salida */
          archivoSalida.write(trama,1024);
      

      Why don't you use trama.size() instead of 1024?

      RIVOPICOR 1 Reply Last reply
      2
      • jsulmJ jsulm

        @RIVOPICO Are you sure "trama" does not contain more than 1024 bytes?

        /* Crear la trama de datos */
            trama = tamano1 + "|@|" + tamano2 + "|@|" + tamano3 + "|@|" + nombreEjecutable1.toLatin1() + "|@|" + nombreEjecutable2.toLatin1();
            /* Escribir la trama en los últimos 1024 bytes del archivo de salida */
            archivoSalida.write(trama,1024);
        

        Why don't you use trama.size() instead of 1024?

        RIVOPICOR Offline
        RIVOPICOR Offline
        RIVOPICO
        wrote on last edited by RIVOPICO
        #3

        @jsulm said in Bind different files program Qt:

        Escribir la trama en los últimos 1024 bytes del archivo de salida

        It's like a copy i'm copying file taking blocks of 1024 bytes to get size of trama. And the other is i want to put some icon in archivoSalida without change the resources of my other files. Or protect resources of my stub or something like that. I dont know if it is possible.

        If you still dont understand me, what i'm trying, i'm trying this:
        https://www.youtube.com/watch?v=sWIQIi4lg58

        I want to put resources to my executable files. In my case i want to put some resource like (icon) to my file archivoSalida. So i will add in my binder one textview and one pushbutton i will include this icon and will be added like resource to my executable file ArchivoSalida.

        jsulmJ 1 Reply Last reply
        0
        • RIVOPICOR RIVOPICO

          @jsulm said in Bind different files program Qt:

          Escribir la trama en los últimos 1024 bytes del archivo de salida

          It's like a copy i'm copying file taking blocks of 1024 bytes to get size of trama. And the other is i want to put some icon in archivoSalida without change the resources of my other files. Or protect resources of my stub or something like that. I dont know if it is possible.

          If you still dont understand me, what i'm trying, i'm trying this:
          https://www.youtube.com/watch?v=sWIQIi4lg58

          I want to put resources to my executable files. In my case i want to put some resource like (icon) to my file archivoSalida. So i will add in my binder one textview and one pushbutton i will include this icon and will be added like resource to my executable file ArchivoSalida.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @RIVOPICO

          archivoSalida.write(trama,1024);
          

          This will only write <=1024 bytes even if trampa contains more than 1024 bytes.
          This could be the reason why the content of the file is broken.
          Again: why don't you just write:

          archivoSalida.write(trama);
          

          ?
          See: http://doc.qt.io/qt-5/qiodevice.html#write
          If you going to change files often then I would not put them in one file - as you see it is much work to change something.

          1 Reply Last reply
          0
          • RIVOPICOR Offline
            RIVOPICOR Offline
            RIVOPICO
            wrote on last edited by
            #5

            Yeah but i can change the resources of one executable with Qt in one only executable without touch my other's. And it's possible like https://www.youtube.com/watch?v=sWIQIi4lg58
            But i dont know how i can do this with only using one textview and pushbutton. And then include like resource and then read this resource in my executable archivosalida.

            1 Reply Last reply
            0
            • RIVOPICOR Offline
              RIVOPICOR Offline
              RIVOPICO
              wrote on last edited by RIVOPICO
              #6

              Or if it is difficult maybe i can set the filename of archivosalida with icon included and then i will get the file with the resources included.

              1 Reply Last reply
              0
              • RIVOPICOR Offline
                RIVOPICOR Offline
                RIVOPICO
                wrote on last edited by RIVOPICO
                #7

                ok i change that:

                QByteArray trama(1024,'0'); -> QByteArray trama;
                archivoSalida.write(trama,1024); -> archivoSalida.write(trama):
                

                If i change this:
                QByteArray trama(1024,'0'); -> QByteArray trama;

                I get this error:
                alt text

                the strange thing i can join files of 100 MB or without any limit using one trama of 1024 bytes¿? LOL

                jsulmJ 1 Reply Last reply
                0
                • RIVOPICOR RIVOPICO

                  ok i change that:

                  QByteArray trama(1024,'0'); -> QByteArray trama;
                  archivoSalida.write(trama,1024); -> archivoSalida.write(trama):
                  

                  If i change this:
                  QByteArray trama(1024,'0'); -> QByteArray trama;

                  I get this error:
                  alt text

                  the strange thing i can join files of 100 MB or without any limit using one trama of 1024 bytes¿? LOL

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @RIVOPICO Try

                  archivoSalida.write(trama, trama.size());
                  
                  RIVOPICOR 2 Replies Last reply
                  0
                  • jsulmJ jsulm

                    @RIVOPICO Try

                    archivoSalida.write(trama, trama.size());
                    
                    RIVOPICOR Offline
                    RIVOPICOR Offline
                    RIVOPICO
                    wrote on last edited by
                    #9

                    @jsulm it's strange but when i bind files in linux works and when i compile for windows bind files but not seem's to do the functions that i use.

                    1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @RIVOPICO Try

                      archivoSalida.write(trama, trama.size());
                      
                      RIVOPICOR Offline
                      RIVOPICOR Offline
                      RIVOPICO
                      wrote on last edited by RIVOPICO
                      #10

                      @jsulm But how i can put the size of my trama in my stub if i dont know the size??? Because i can change in my binder but i must to put the size of my trama to read the files.

                      jsulmJ 1 Reply Last reply
                      0
                      • RIVOPICOR RIVOPICO

                        @jsulm But how i can put the size of my trama in my stub if i dont know the size??? Because i can change in my binder but i must to put the size of my trama to read the files.

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @RIVOPICO I don't understand the problem. If you put something into QByteArray then that array knows its size and you can get it calling size() method as shown before.

                        RIVOPICOR 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @RIVOPICO I don't understand the problem. If you put something into QByteArray then that array knows its size and you can get it calling size() method as shown before.

                          RIVOPICOR Offline
                          RIVOPICOR Offline
                          RIVOPICO
                          wrote on last edited by RIVOPICO
                          #12

                          @jsulm yeah but if you check in the stub you will see these lines:

                          archivoStub->seek(archivoStub->size() - 1024);
                          trama = archivoStub->read(1024);
                          

                          I'm extracting my trama and then i read it. I can put trama size in my binder. But in my stub how i can read this trama? Because if i put 1024 i know the size and i can extract this trama and then read it. But if i dont know my trama how my stub can read my trama? Because if i dont know where is the trama will show me list outrange. So in other words if i want to read my trama i must to know this size of my trama or include something in my stub to get the size of this trama.

                          Yeah i know but im trying to say that i seek my trama, i extract my trama because i know the size in my case i only put with 1024 bytes but i dont know if the size is more big (undefined)how my stub can know this size of trama? so i think my stub can't know the size of my trama.

                          jsulmJ 2 Replies Last reply
                          0
                          • RIVOPICOR RIVOPICO

                            @jsulm yeah but if you check in the stub you will see these lines:

                            archivoStub->seek(archivoStub->size() - 1024);
                            trama = archivoStub->read(1024);
                            

                            I'm extracting my trama and then i read it. I can put trama size in my binder. But in my stub how i can read this trama? Because if i put 1024 i know the size and i can extract this trama and then read it. But if i dont know my trama how my stub can read my trama? Because if i dont know where is the trama will show me list outrange. So in other words if i want to read my trama i must to know this size of my trama or include something in my stub to get the size of this trama.

                            Yeah i know but im trying to say that i seek my trama, i extract my trama because i know the size in my case i only put with 1024 bytes but i dont know if the size is more big (undefined)how my stub can know this size of trama? so i think my stub can't know the size of my trama.

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • RIVOPICOR RIVOPICO

                              @jsulm yeah but if you check in the stub you will see these lines:

                              archivoStub->seek(archivoStub->size() - 1024);
                              trama = archivoStub->read(1024);
                              

                              I'm extracting my trama and then i read it. I can put trama size in my binder. But in my stub how i can read this trama? Because if i put 1024 i know the size and i can extract this trama and then read it. But if i dont know my trama how my stub can read my trama? Because if i dont know where is the trama will show me list outrange. So in other words if i want to read my trama i must to know this size of my trama or include something in my stub to get the size of this trama.

                              Yeah i know but im trying to say that i seek my trama, i extract my trama because i know the size in my case i only put with 1024 bytes but i dont know if the size is more big (undefined)how my stub can know this size of trama? so i think my stub can't know the size of my trama.

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              @RIVOPICO Well, if the size of what you want to read is variable then you need to specify a format. For example you can first put an integer into your file specifying the size and then trama of that size, then again size and trama and so on:
                              SIZE1TRAMA1SIZE2TRAMA2
                              Then you know how to interpret what you're reading.
                              For such stuff it is better to use QDataStream instead of QFile directly.

                              QFile file("file.dat");
                              file.open(QIODevice::ReadOnly);
                              QDataStream in(&file);
                              int size;
                              // Do the following in a loop until finished reading
                              in >> size;
                              char buffer[BUFFER_SIZE];
                              in.readRawData(buffer, size);
                              
                              RIVOPICOR 1 Reply Last reply
                              2
                              • jsulmJ jsulm

                                @RIVOPICO Well, if the size of what you want to read is variable then you need to specify a format. For example you can first put an integer into your file specifying the size and then trama of that size, then again size and trama and so on:
                                SIZE1TRAMA1SIZE2TRAMA2
                                Then you know how to interpret what you're reading.
                                For such stuff it is better to use QDataStream instead of QFile directly.

                                QFile file("file.dat");
                                file.open(QIODevice::ReadOnly);
                                QDataStream in(&file);
                                int size;
                                // Do the following in a loop until finished reading
                                in >> size;
                                char buffer[BUFFER_SIZE];
                                in.readRawData(buffer, size);
                                
                                RIVOPICOR Offline
                                RIVOPICOR Offline
                                RIVOPICO
                                wrote on last edited by
                                #15

                                @jsulm yeah this i was trying. because if i put the size and then i can read this size, i can read my trama too. But i have some doubts, this code is for reading or for including the size of my data? sorry for all!

                                jsulmJ ? 2 Replies Last reply
                                0
                                • RIVOPICOR RIVOPICO

                                  @jsulm yeah this i was trying. because if i put the size and then i can read this size, i can read my trama too. But i have some doubts, this code is for reading or for including the size of my data? sorry for all!

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  @RIVOPICO Reading

                                  RIVOPICOR 1 Reply Last reply
                                  0
                                  • jsulmJ jsulm

                                    @RIVOPICO Reading

                                    RIVOPICOR Offline
                                    RIVOPICOR Offline
                                    RIVOPICO
                                    wrote on last edited by RIVOPICO
                                    #17

                                    @jsulm i was thinking to include other trama with the size of my real trama and then get the size of the real trama because my other trama has defined size. Other way will be with a format but i dont know if i can seek one file with format or how i can read this file included in my all files. Anyways i think int number doesn't take many space to be a problem, i think.

                                    1 Reply Last reply
                                    0
                                    • RIVOPICOR RIVOPICO

                                      @jsulm yeah this i was trying. because if i put the size and then i can read this size, i can read my trama too. But i have some doubts, this code is for reading or for including the size of my data? sorry for all!

                                      ? Offline
                                      ? Offline
                                      A Former User
                                      wrote on last edited by
                                      #18

                                      @RIVOPICO Is there a reason why you keep deleting your postings? Makes it pretty hard to follow the thread.

                                      1 Reply Last reply
                                      2

                                      • Login

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