This is an error not a warning. The warning goes to the console that you can't see without a development environment.
...after QApplication is initalized.Anyway, the problem disappeared after declaring ui on heap and initializing it with the new keyword.
Bookmarks