Question

Above is the Error returned from Qt Designer

The first line in the ui file reads as follows:
enter image description here

Any idea what is the issue with this line, and how to overcome this problem?

Was it helpful?

Solution

Your issue is the missing space. I have tried the following line in my QtDesigner:

<?xml version="1.0"encoding="UTF-8"?>

It did not work, but when I modified it to contain the space after the quote and before the next attribute like this:

<?xml version="1.0" encoding="UTF-8"?>

The designer could load it just fine.

You probably accidentally made this mistake while manually viewing the file.

Admittedly, QtDesigner is reporting the error weird because if you look up an xml validation program (xml lint, www.xmlvalidation.com) for your content, they will provide more accurate error diagnotic as follows:

Errors in the XML document:

1: 36 White space is required before the encoding pseudo attribute in the XML declaration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top