Original address: QT UI program uses Linux files to operate open, close Kjpioo
This problem is raised because the close () function will conflict with qwidget::close () in the Qwidget type of Qt object, and if you use close () directly when the class function is implemented, you will be prompted for the error when the program compiles (specifically what errors do not remember).
The reason for the error is that Qwidget::close () has an ambiguity with the close () of the file closing standard function in stdio.h. So you can refer to the solutions in the links below.
Http://bytes.com/topic/c/answers/856501-use-close-int-unistd-h-qt
In addition, Lin Rui's high quality C + + programming, v1.0 P58, describes how to use global functions in a class when global functions and class member functions have the same name:
Regardless of whether the parameters of the two Print functions are different, if a member function of the class is to call the global function print, in order to distinguish it from the member function print, the global function is called with a ': ' Flag. Such as
::P rint (...); /indicates that Print is a global function and not a member function http://blog.chinaunix.net/uid-12461657-id-3038105.html
QT UI program uses Linux files to operate open, close (go)