diff options
author | Liang Qi <liang.qi@qt.io> | 2017-10-30 08:42:53 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-10-30 08:48:01 +0100 |
commit | c9acfe0bc8dbaec1065614fa2039ebe7e05b4bda (patch) | |
tree | 6ced392965bf01be840da14e7f1606b0b5b2293d /examples/activeqt/hierarchy/objects.h | |
parent | f263d206341472e23e0e1ad536faa1b0a22286c0 (diff) | |
parent | cacf666f95df9790cebf5d5cdb0609cee257fab3 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta4
Conflicts:
.qmake.conf
Change-Id: Ie457478a64a28434afb3361dfc6f9478dd9c58bd
Diffstat (limited to 'examples/activeqt/hierarchy/objects.h')
-rw-r--r-- | examples/activeqt/hierarchy/objects.h | 30 |
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] |