Skip to content

Commit

Permalink
QtBase: examples/widgets/layouts coding style
Browse files Browse the repository at this point in the history
Change-Id: I4340c1fcbb467bf3c2ace3b4bd4b042fe9521c35
Reviewed-by: hjk <[email protected]>
  • Loading branch information
davschul authored and The Qt Project committed Nov 21, 2012
1 parent 9b49c05 commit 78c3748
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 18 deletions.
8 changes: 4 additions & 4 deletions examples/widgets/layouts/basiclayouts/dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets/layouts/basiclayouts/dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ class Dialog : public QDialog
};
//! [0]

#endif
#endif // DIALOG_H
2 changes: 0 additions & 2 deletions examples/widgets/layouts/borderlayout/borderlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
**
****************************************************************************/

#include <QtWidgets>

#include "borderlayout.h"

BorderLayout::BorderLayout(QWidget *parent, int margin, int spacing)
Expand Down
3 changes: 1 addition & 2 deletions examples/widgets/layouts/borderlayout/borderlayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

#include <QLayout>
#include <QRect>
#include <QWidgetItem>

class BorderLayout : public QLayout
{
Expand Down Expand Up @@ -85,4 +84,4 @@ class BorderLayout : public QLayout
QList<ItemWrapper *> list;
};

#endif
#endif // BORDERLAYOUT_H
4 changes: 2 additions & 2 deletions examples/widgets/layouts/borderlayout/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
**
****************************************************************************/

#include <QtWidgets>

#include "borderlayout.h"
#include "window.h"
#include <QTextBrowser>
#include <QLabel>

Window::Window()
{
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets/layouts/borderlayout/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ class Window : public QWidget
QLabel *createLabel(const QString &text);
};

#endif
#endif // WINDOW_H
3 changes: 1 addition & 2 deletions examples/widgets/layouts/dynamiclayouts/dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#ifndef DIALOG_H
#define DIALOG_H

#include <QMainWindow>
#include <QDialog>
#include <QQueue>

Expand Down Expand Up @@ -88,4 +87,4 @@ private slots:
QGridLayout *optionsLayout;
};

#endif
#endif // DIALOG_H
4 changes: 2 additions & 2 deletions examples/widgets/layouts/flowlayout/flowlayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#include <QLayout>
#include <QRect>
#include <QWidgetItem>
#include <QStyle>
//! [0]
class FlowLayout : public QLayout
{
Expand Down Expand Up @@ -75,4 +75,4 @@ class FlowLayout : public QLayout
};
//! [0]

#endif
#endif // FLOWLAYOUT_H
2 changes: 1 addition & 1 deletion examples/widgets/layouts/flowlayout/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
**
****************************************************************************/

#include <QtWidgets>
#include <QPushButton>

#include "flowlayout.h"
#include "window.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets/layouts/flowlayout/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ class Window : public QWidget
};
//! [0]

#endif
#endif // WINDOW_H

0 comments on commit 78c3748

Please sign in to comment.