Skip to content
  • 144k Topics
    721k Posts
    R
    @SGaist How did you implement it in the end ? I'm still working on it. :) The app is kind of a toolkit for inspecting CSV files and correcting them to a limited extent, if necessary. These files can come from anywhere, and often the consumer of a CSV file doesn't have any control over the process which creates them. What it is supposed to do is the following: Determine the text encoding used, either semi-automatically (if Unicode is used, this can be 100% automatic) or by letting the user choose, or for unknown 8-bit encodings iconv, uchardet or icu can be used if the support is installed; If the encoding cannot be determined, the file is rejected, or else the user can try different encodings. This is where the control characters can be displayed; As to how I am implementing this internally, a copy of the text from the file is made, converting it to QString and using QTextEdit to display it. All of the special control characters can either be displayed or hidden depending on the user's preference; also the highlighting (colors, etc.) is user-configurable; The delimiter token and quote character can be automatically determined through heuristics, or the user can override these to something else; There is a limited amount of support for comments and metadata at the beginning of a file. The user can add or remove these, and the file can be saved without the extra metadata, and/or in a different encoding, lie endings, etc. Since I don't want to turn this into a full-fledged text editor, the app will just print out a report if the CSV file is not acceptably formatted, indicating the location of invalid characters, and the user can correct this in some other application. When importing CSV data into a database, for example, often the import will fail without giving enough diagnostic information as to where the failure occurred. This app should be helpful in that respect.
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    M
    [image: ODHRlhR.gif]
  • Everything related to designing and design tools

    127 382
    127 Topics
    382 Posts
    R
    I see this is an old thread and I see several unresolved threads on this topic. I'm leaving this incase it helps someone else who ends up here. The solution was twofold for me. Go to File > Export Project and select Enable Python Generator. This will create a main.py. Make sure you pip install PySide6-DS Hope this helps someone.
  • Everything related to the QA Tools

    76 212
    76 Topics
    212 Posts
    A
    Hello, we're using the squish teamcity plugin and were wondering whether it was possible to configure the test report a bit more to our liking. We'd like the JUnit XML report and disable the other reports. It seems that in the TC build step it isn't possible to add/override the --reportgen option: [image: 8219c95e-dd8d-4dd6-93e9-72024cd65943.png] What are our options? Cheers, Adam
  • Everything related to learning Qt.

    379 2k
    379 Topics
    2k Posts
    T
    I can't edit my previous message now but I finally managed to run the program. It seems that the file path was too long, and by renaming my project to "Challenge1" (it was previously called "QML-for-Beginners-Challenges-Intro-to-QML"), it worked.
  • 2k Topics
    13k Posts
    SGaistS
    Hi, I think you went the too complicated road: quint16 calculateCrc16Arc(const QByteArray &data) { quint16 crc = 0x0000; const quint16 poly = 0xA001; for (char byte : data) { crc ^= (static_cast<quint8>(byte)); for (int i = 0; i < 8; i++) { crc = (crc & 0x0001) > 0 ? (crc >> 1) ^ poly : (crc >> 1); } } return crc; }
  • 4k Topics
    18k Posts
    SGaistS
    Bonjour, L'erreur vient du fait de la re-déclaration que vous faites dans votre fichier. Ces catégories existent déjà vu que déclarée dans qscxmlglobals_p.h. Pour votre code, vous devriez déclarer vos propres catégories afin de les garder indépendantes de celle de Qt et de pouvoir les filtrer à votre convenance.
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    SGaistS
    @RokeJulianLockhart to the best of my knowledge, no. The first release of Discourse was in 2014 and the forum is several years older than that.