如何在c++中使用QT解决这个问题
how i can resolve that in c++ using QT
QString fileName = QFileDialog::getOpenFileName(bla bla bla);
QFile file(fileName);
ReadXML Rxml;
Rxml.readXML(file);
我得到以下编译错误:
QFile:QFile(const QFile&) is private in definition of macro 'Q_DISABLE_COPY' within this context use of deleted function 'QFile::QFile(const QFile&)'
有人能帮帮我吗?
你不能复制QFile
重构你的readXML以接受QFile*或QFile&或者QIODevice* (qt中最灵活和常用的选项),并传递一个指针或引用。
相关文章:
- 如何在qt中将信号和插槽与另一个对象连接 --解决了
- 如何解决"no Qt platform plugin could be initialized"问题?
- 如何在qt中将对象添加到现有布局中?--已解决
- 在qt QFileDialog中设置后缀在linux中不起作用,如何解决?
- 透视视图的任何解决方案 openGL qt.
- 在将QT与Cmake一起使用时解决链接错误
- VTK / ITK/ QT - 未解决的外部符号错误 (LNK2001)
- 如何使用Qt解决"Position Independant code"错误
- QT创建者:简单程序未解决的外部符号和外部符号错误
- 如何解决Qt中的模板问题
- 解决QT类的特定C 钻石问题
- 构建静态QT时未解决的外部
- 从QTcpSocket上的数据流中连续运行复杂算法的最佳Qt线程解决方案是什么
- 解决枚举命名问题 - Qt
- 如何在QT Android应用程序中解决慢速滚动
- 在CentOS 7 x64上编译QT时,如何解决矛盾的库问题
- QT私有API未解决的外部符号
- QT Enumprocess-未解决的外部
- 如何解决Qt创建者的变量"<not accessible>"行为?
- 无法解决 Qt/C++/NMake 的链接器错误 - 未使用选项 '/LIBPATH:' 指定参数 (Qt 5.2.0/MSVC 2010)