Answer the question
In order to leave comments, you need to log in
How to include the header file correctly?
Hello! I have a problem that I can't solve all day.
I immediately apologize for the poor code, it will get better.
So, to the point, there is a UserInterface class used to work with the interface. The interface itself is made in Qt Designer and generated using the uic utility.
In qt designer, a promote was made for the widget.
Here is the header file of the widget:
//mainwidget.h
#include <QtWidgets>
#include <QtCore>
#include <QtGui>
#include <iostream>
#include "UserInterface.h"
class MainWidget : public QWidget {
Q_OBJECT;
public:
MainWidget(QWidget *parent = 0);
};
// UserInterface.h
#include <QtCore>
#include <QtWidgets>
#include <QtGui/QtGui>
#include <vector>
#include "gui.h"
#include <unistd.h>
#include "mainwidget.h"
using namespace std;
class UserInterface {
QMainWindow *mainWindow;
public:
UserInterface(vector<string> list);
void start();
void updateList(vector<string> list);
void flushFileList();
vector<string> list;
Ui_MainWindow *gui;
};
Ui_MainWindow *gui;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question