Skip to content
  • 0 Votes
    8 Posts
    3k Views
    Q

    The solution to that problem is to insert the following call to the constructor of the file processing class:

    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));

    Concerning the shell:
    I use BusyBox (its light) which doesn't provide locale and the environment variables like LANG=en_US.UTF-8.
    For compiling BusyBox configurations can or have to be given containing

    CONFIG_LAST_SUPPORTED_WCHAR=0

    the number is the last displayable number of the Unicode list, 0 signifies that all characters shall be displayed, it was set to 767 which includes west European characters. The excluded characters are replaced by the character defined in the same configs, in my case it is "?".

  • 0 Votes
    12 Posts
    5k Views
    SGaistS

    Then, AFAUI, you have all what you need to continue. If implementing the proxy model looks daunting start by just a custom QAbstractItemModel with a QListView and once you have what you want you can go with the proxy and the shifting I suggested before.

  • 0 Votes
    5 Posts
    3k Views
    oblivioncthO

    @Rondog @alex_malyu

    I see that this is not as simple as I had hoped and I guess I will just deal with using a directory browse or letting the user set the name. The reason i have the user interacting with an .ini is because it is not just global program settings that are loaded. I want the user to have multiple configurations that they can easily switch between that have file paths and numeric settings saved so that the program can be used easily in rapid succession. The GUI is a port of a console application that is not yet finished so I want debugging with it to be quick. This is why I have the ability to save and load a .ini file so that if a user keeps testing with the same paths over and over they don't need to keep browsing for the same files over and over again. However, I wanted there to be the ability to have multiple setups saved which is why I don't just want there to be one .ini that is used automatically.

    I know I could use some kind of slot system with the same .ini (like saves lots on a video game) to accomplish the same thing and the user just picks one of those slots. But like I said the application is not finished yet (the code behind the GUI) so it being perfectly clean is not an issue at the moment.

    Thank you for the information.

  • 0 Votes
    2 Posts
    1k Views
    T

    É um vídeo antigo mas já te dá uma idéia.

    https://www.youtube.com/watch?v=92biLZST6Vg