implement Table example
This commit is contained in:
parent
a24c010be1
commit
47de57fcd9
|
@ -0,0 +1,29 @@
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include "tableexamples.h"
|
||||||
|
#include "components/table.h"
|
||||||
|
#include "frame.h"
|
||||||
|
|
||||||
|
TableExamples::TableExamples(QWidget *parent)
|
||||||
|
: ExampleList(parent)
|
||||||
|
{
|
||||||
|
QLayout *mainLayout = widget()->layout();
|
||||||
|
|
||||||
|
{
|
||||||
|
Table *table = new Table;
|
||||||
|
|
||||||
|
table->setRowCount(70);
|
||||||
|
table->setColumnCount(5);
|
||||||
|
|
||||||
|
Frame *frame = new Frame;
|
||||||
|
frame->setCodeSnippet(
|
||||||
|
""
|
||||||
|
);
|
||||||
|
frame->setWidget(table);
|
||||||
|
|
||||||
|
mainLayout->addWidget(frame);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TableExamples::~TableExamples()
|
||||||
|
{
|
||||||
|
}
|
|
@ -1,4 +1,15 @@
|
||||||
#ifndef TABLEEXAMPLES_H
|
#ifndef TABLEEXAMPLES_H
|
||||||
#define TABLEEXAMPLES_H
|
#define TABLEEXAMPLES_H
|
||||||
|
|
||||||
|
#include "examplelist.h"
|
||||||
|
|
||||||
|
class TableExamples : public ExampleList
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit TableExamples(QWidget *parent = 0);
|
||||||
|
~TableExamples();
|
||||||
|
};
|
||||||
|
|
||||||
#endif // TABLEEXAMPLES_H
|
#endif // TABLEEXAMPLES_H
|
||||||
|
|
Loading…
Reference in New Issue