UnicodeUTF8 not member QApplication - generated with Qt5 Designer
-
So I upgraded to Qt5...I loaded my apps from QT4 and I fixed a # of issues like #includes to the Qt5 style. So it gets through most of files now without error. BUT, when it generates the UI headers, Qt actually generates the incorrect code like so:
iHighlightButton->setText(QApplication::translate("DoubleGraphicView", "Highlight Items", 0, QApplication::UnicodeUTF8));
iUnHighlightButton->setText(QApplication::translate("DoubleGraphicView", "Unhighlight Items", 0, QApplication::UnicodeUTF8));So why would Qt5 generate this which are deprecated values in Qt5...? Am I missing a setting?
-
QCoreApplication::UnicodeUTF8 is deprecated
This enum type used to define the 8-bit encoding of character string arguments to translate(). This enum is now obsolete and UTF-8 will be used in all cases. So remove all instances of QCoreApplication::UnicodeUTF8. For example:
Href_Gui->setWindowTitle(QApplication::translate("Href_Gui", "Url / www", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("Href_Gui", "Text:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("Href_Gui", "Url:", 0, QApplication::UnicodeUTF8)); label_3->setText(QApplication::translate("Href_Gui", "Target / Name:", 0, QApplication::UnicodeUTF8));
to
Href_Gui->setWindowTitle(QApplication::translate("Href_Gui", "Url / www", 0)); label->setText(QApplication::translate("Href_Gui", "Text:", 0)); label_2->setText(QApplication::translate("Href_Gui", "Url:", 0)); label_3->setText(QApplication::translate("Href_Gui", "Target / Name:", 0));
This solved my problem
-
True. an old post; I found it since I had the same issue. In case someone still needs a solution: I had to manually delete the old intermediate files (moc_*, *.o) that were in the same directory as the source code, then run qmake (from QtCreater menu). Now solved.
-
True. an old post; I found it since I had the same issue. In case someone still needs a solution: I had to manually delete the old intermediate files (moc_*, *.o) that were in the same directory as the source code, then run qmake (from QtCreater menu). Now solved.