
code show as below QFile file (strDir + fileName ) if (file. The above is after using webcompiler to compile less into qss file, modify the format of qss file to UTF-8 without BOM, this operation is not smart,Īfter less files are compiled into qss, there is no need to modify the file format of qss, and qss can also be modified in the qt code. This causes problems with qt parsing qss. The following is opened in a BOM-free format (that is, UTF-8 without BOM format encoding)Ĭomparing the two pictures, it can be seen that the first picture has 3 more characters, EF BB BF.

The following is opened in the format with BOM (ie UTF-8 format encoding)

Let's talk about the difference between UTF without BOM and BOM. The normal situation is as follows:Īfter a long time of investigation, open the corresponding qss in notepad++, in the format menu, you can see that the display is in UTF-8 encoding format, as shown in the figure belowĬhange the format to UTF-8 without BOM format encoding, and then recompile with rcc to be OK. In addition, you will want to use a production grade Python web server rather than the built in Flask server. If you serve a large number of files then this will speed up your application.

When doing multi-skin development of qt today, after webcompiler compiles less into qss, and then compiles it into rcc file with rcc tool, some styles are not loaded, the effect is as follows:Īs shown in the figure above, the red box is actually a close button, but it cannot be displayed. In production, it is recommended to serve static files with a server such as nginx to keep the load on your Python web server as light as possible.
