summaryrefslogtreecommitdiffstats
path: root/examples/demo/opengl/glinfotext.h
blob: 7d7b65647cc9f19ccc88fae88a7f0ea880aba5f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <qlayout.h>
#include <qtextview.h>
#include <qfont.h>
#include "glinfo.h"

class GLInfoText : public QWidget
{
public:
    GLInfoText(QWidget *parent) 
	: QWidget(parent)
    {
	view = new QTextView(this);
	view->setFont(QFont("courier", 10));
	view->setWordWrap(QTextEdit::NoWrap);
	QHBoxLayout *l = new QHBoxLayout(this);
	l->addWidget(view);
	GLInfo info;
	view->setText(info.info());
    }
    
private:
    QTextView *view;
};