diff options
| author | Liang Qi <liang.qi@qt.io> | 2017-11-21 14:34:31 +0100 |
|---|---|---|
| committer | Liang Qi <liang.qi@qt.io> | 2017-11-23 09:36:03 +0100 |
| commit | 153e8b49adfe210cb00490284a14c94c08e03c3f (patch) | |
| tree | 59d9522d6dc96215cc2cb1d19b3e8a0e580bcb41 /examples/opengl/qopenglwidget/mainwindow.cpp | |
| parent | ef7c0594bf9e41813c9c841e00c3a52269d363f5 (diff) | |
| parent | a4113d0c644edba1c39d9d268a259e95ae51c61e (diff) | |
| download | qtbase-153e8b49adfe210cb00490284a14c94c08e03c3f.tar.gz | |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
src/network/access/qhttp2protocolhandler_p.h
src/network/kernel/kernel.pri
src/network/ssl/qsslkey_qt.cpp
src/plugins/platforms/cocoa/qcocoascreen.mm
src/plugins/platforms/windows/accessible/iaccessible2.cpp
src/plugins/platforms/windows/accessible/iaccessible2.h
src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
src/widgets/widgets/qmenu_p.h
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
tests/auto/other/qaccessibility/tst_qaccessibility.cpp
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
Diffstat (limited to 'examples/opengl/qopenglwidget/mainwindow.cpp')
| -rw-r--r-- | examples/opengl/qopenglwidget/mainwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/opengl/qopenglwidget/mainwindow.cpp b/examples/opengl/qopenglwidget/mainwindow.cpp index 1bb2aa2bf0..4bd123628f 100644 --- a/examples/opengl/qopenglwidget/mainwindow.cpp +++ b/examples/opengl/qopenglwidget/mainwindow.cpp @@ -56,6 +56,7 @@ #include <QSlider> #include <QLabel> #include <QCheckBox> +#include <QRandomGenerator> #include <QSpinBox> #include <QScrollArea> @@ -155,7 +156,9 @@ void MainWindow::addNew() { if (m_nextY == 4) return; - GLWidget *w = new GLWidget(this, false, qRgb(qrand() % 256, qrand() % 256, qrand() % 256)); + GLWidget *w = new GLWidget(this, false, qRgb(QRandomGenerator::global()->bounded(256), + QRandomGenerator::global()->bounded(256), + QRandomGenerator::global()->bounded(256))); m_glWidgets << w; connect(m_timer, &QTimer::timeout, w, QOverload<>::of(&QWidget::update)); m_layout->addWidget(w, m_nextY, m_nextX, 1, 1); |
