I create a new widget to display roadmaps. there is a way to add this widget to the UI designer. For the moment, I have just added direclty in my code.
#ifndef QMAPS_H
#define QMAPS_H
#include <QWidget>
#include <QtGui>
Q_OBJECT
public:
QSize minimumSizeHint
() const;
protected:
private:
};
#endif // QMAPS_H
#ifndef QMAPS_H
#define QMAPS_H
#include <QWidget>
#include <QtGui>
class QMaps : public QWidget{
Q_OBJECT
public:
QMaps(QWidget *parent = 0);
QSize sizeHint() const;
QSize minimumSizeHint() const;
protected:
void paintEvent(QPaintEvent *event);
private:
};
#endif // QMAPS_H
To copy to clipboard, switch view to plain text mode
MainWindow
::MainWindow(QWidget *parent
){
ui->setupUi(this);
qout=new QDebugStream(std::cout, ui->textBox);
qmaps=new QMaps(this);
qmaps->show();
}
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindowClass)
{
ui->setupUi(this);
qout=new QDebugStream(std::cout, ui->textBox);
qmaps=new QMaps(this);
qmaps->show();
}
To copy to clipboard, switch view to plain text mode
Bookmarks