summaryrefslogtreecommitdiffstats
path: root/examples/activeqt/hierarchy/objects.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/activeqt/hierarchy/objects.h')
-rw-r--r--examples/activeqt/hierarchy/objects.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/examples/activeqt/hierarchy/objects.h b/examples/activeqt/hierarchy/objects.h
index 4ceea1f..91f7e9d 100644
--- a/examples/activeqt/hierarchy/objects.h
+++ b/examples/activeqt/hierarchy/objects.h
@@ -6,7 +6,17 @@
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -56,17 +66,17 @@ class QParentWidget : public QWidget
Q_CLASSINFO("InterfaceID", "{4a30719d-d9c2-4659-9d16-67378209f822}");
Q_CLASSINFO("EventsID", "{4a30719d-d9c2-4659-9d16-67378209f823}");
public:
- QParentWidget(QWidget *parent = 0);
+ explicit QParentWidget(QWidget *parent = nullptr);
QSize sizeHint() const;
public slots:
- void createSubWidget( const QString &name );
+ void createSubWidget(const QString &name);
- QSubWidget *subWidget( const QString &name );
+ QSubWidget *subWidget(const QString &name);
private:
- QVBoxLayout *vbox;
+ QVBoxLayout *m_vbox;
};
//! [0]
@@ -74,25 +84,25 @@ private:
class QSubWidget : public QWidget
{
Q_OBJECT
- Q_PROPERTY( QString label READ label WRITE setLabel )
+ Q_PROPERTY(QString label READ label WRITE setLabel)
Q_CLASSINFO("ClassID", "{850652f4-8f71-4f69-b745-bce241ccdc30}");
Q_CLASSINFO("InterfaceID", "{2d76cc2f-3488-417a-83d6-debff88b3c3f}");
Q_CLASSINFO("ToSuperClass", "QSubWidget");
public:
- QSubWidget(QWidget *parent = 0, const QString &name = QString());
+ QSubWidget(QWidget *parent = nullptr, const QString &name = QString());
- void setLabel( const QString &text );
+ void setLabel(const QString &text);
QString label() const;
QSize sizeHint() const;
protected:
- void paintEvent( QPaintEvent *e );
+ void paintEvent(QPaintEvent *e);
private:
- QString lbl;
+ QString m_label;
};
//! [1]