QtBase: examples/widgets/layouts coding style
Change-Id: I4340c1fcbb467bf3c2ace3b4bd4b042fe9521c35 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
parent
9b49c0561e
commit
78c374865e
@ -116,10 +116,10 @@ void Dialog::createGridGroupBox()
|
||||
|
||||
//! [9]
|
||||
for (int i = 0; i < NumGridRows; ++i) {
|
||||
labels[i] = new QLabel(tr("Line %1:").arg(i + 1));
|
||||
lineEdits[i] = new QLineEdit;
|
||||
layout->addWidget(labels[i], i + 1, 0);
|
||||
layout->addWidget(lineEdits[i], i + 1, 1);
|
||||
labels[i] = new QLabel(tr("Line %1:").arg(i + 1));
|
||||
lineEdits[i] = new QLineEdit;
|
||||
layout->addWidget(labels[i], i + 1, 0);
|
||||
layout->addWidget(lineEdits[i], i + 1, 1);
|
||||
}
|
||||
|
||||
//! [9] //! [10]
|
||||
|
@ -87,4 +87,4 @@ private:
|
||||
};
|
||||
//! [0]
|
||||
|
||||
#endif
|
||||
#endif // DIALOG_H
|
||||
|
@ -38,8 +38,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "borderlayout.h"
|
||||
|
||||
BorderLayout::BorderLayout(QWidget *parent, int margin, int spacing)
|
||||
|
@ -43,7 +43,6 @@
|
||||
|
||||
#include <QLayout>
|
||||
#include <QRect>
|
||||
#include <QWidgetItem>
|
||||
|
||||
class BorderLayout : public QLayout
|
||||
{
|
||||
@ -85,4 +84,4 @@ private:
|
||||
QList<ItemWrapper *> list;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // BORDERLAYOUT_H
|
||||
|
@ -38,10 +38,10 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
|
||||
#include "borderlayout.h"
|
||||
#include "window.h"
|
||||
#include <QTextBrowser>
|
||||
#include <QLabel>
|
||||
|
||||
Window::Window()
|
||||
{
|
||||
|
@ -58,4 +58,4 @@ private:
|
||||
QLabel *createLabel(const QString &text);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // WINDOW_H
|
||||
|
@ -41,7 +41,6 @@
|
||||
#ifndef DIALOG_H
|
||||
#define DIALOG_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QDialog>
|
||||
#include <QQueue>
|
||||
|
||||
@ -88,4 +87,4 @@ private:
|
||||
QGridLayout *optionsLayout;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // DIALOG_H
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <QLayout>
|
||||
#include <QRect>
|
||||
#include <QWidgetItem>
|
||||
#include <QStyle>
|
||||
//! [0]
|
||||
class FlowLayout : public QLayout
|
||||
{
|
||||
@ -75,4 +75,4 @@ private:
|
||||
};
|
||||
//! [0]
|
||||
|
||||
#endif
|
||||
#endif // FLOWLAYOUT_H
|
||||
|
@ -38,7 +38,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "flowlayout.h"
|
||||
#include "window.h"
|
||||
|
@ -56,4 +56,4 @@ public:
|
||||
};
|
||||
//! [0]
|
||||
|
||||
#endif
|
||||
#endif // WINDOW_H
|
||||
|
Loading…
Reference in New Issue
Block a user