Resolved within vs2015, Qt ui interface has the object name, cpp file display method is not a member of the

Solution: Compile about the project " .ui" file.

  Also in general, declare an object ui way --------  Ui :: QtGuiTestClass ui;

  When accessing members of ui, 1) ui. 2) ui-> have to choose the first method, because the ui is an object, not a pointer, it is not used 2) ui-> to access members. But in the ui members such as result, when access its functions should be used result-> form. Of course, these are error messages when vs2015 programming. .. "" The result QtCreator used in other forms, the system will automatically help us replace "->" form.

 

FIG 1: VS2015 in

 

 

 

Figure II: QtCreator in

 

 

 

Reference blog: https://blog.csdn.net/it_job/article/details/78767254

 

Solution qt in ui interface objects have names, cpp file or show no members

Guess you like

Origin www.cnblogs.com/WinkinChan/p/12531203.html