Qt有close(int)函数吗?

时间:2013-08-19 12:53:26

标签: qt

我正在使用Qt Creator制作usb嗅探程序。

Qt已经bool close();功能;

但是我想使用fcntl.h用于open(),unistd.h用于close()函数

关闭功能的同名,所以我不知道我不知道该怎么做

1 个答案:

答案 0 :(得分:5)

我认为你的意思是你要调用unistd.h中定义的close()而不是QWidget::close(),在这种情况下,这是一个C ++问题而不是Qt问题。 This会帮助你。解决方案是使用范围解析运算符,如下所示:

::close(); // calls the global function