16,816
社区成员




mainwindow.cpp: In constructor 'MainWindow::MainWindow(QWidget*)':
mainwindow.cpp:12: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:14: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:17: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:18: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:19: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp: In destructor 'virtual MainWindow::~MainWindow()':
mainwindow.cpp:33: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:34: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:35: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:39: warning: possible problem detected in invocation of delete operator:
mainwindow.cpp:39: warning: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: warning: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:39: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
mainwindow.cpp: In member function 'void MainWindow::on_toolButton_browser_clicked()':
mainwindow.cpp:45: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:53: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:54: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp: In member function 'int MainWindow::SearchIntofile(const QString&, const QString&, QTreeWidgetItem*)':
mainwindow.cpp:75: warning: unused variable 'i'
mainwindow.cpp: In member function 'int MainWindow::FindFile(const QString&)':
mainwindow.cpp:111: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:119: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp: In member function 'int MainWindow::search()':
mainwindow.cpp:138: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:146: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp: In member function 'int MainWindow::AddFav()':
mainwindow.cpp:179: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
mainwindow.cpp:180: error: invalid use of incomplete type 'struct Ui::MainWindow'
mainwindow.h:10: error: forward declaration of 'struct Ui::MainWindow'
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <qprogressbar.h>
#include <QTreeWidgetItem>
#include "dialog_filter.h"
#include "ui_mainwindow.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public:
int FindFile(const QString & path);
int SearchIntofile(const QString &file_name,const QString &str_find,QTreeWidgetItem* parent=0);
private:
Ui::MainWindow *ui;
Dialog_filter dlg_filter;
// QProgressBar *progressbar;
bool b_SearchFileContnt;//查找文件内容
bool b_CaseSensitive;//大小写敏感
private slots:
void on_pushButton_jump_clicked();
void on_pushButton_filter_clicked();
void on_toolButton_browser_clicked();
int search();
int about();
int AddFav();
void CaseSensitive();
};
#endif // MAINWINDOW_H
原来没有#include "ui_mainwindow.h",加上去也是一样的错误啊