qt5base-lts/examples/qtconcurrent/primecounter/main.cpp
Dennis Oberst 8352756d27 Example: rename progressdialog to primecounter and modernize it
The previous example finished way too quickly and provided no real
value in regards to API understanding. Previously, QtConcurrent::map
was used, which was also used in other examples. We are now using
QtConcurrent::filterReduce to demonstrate other functionality.

Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: Ibd6eb119d0711cddfe8b211d460e9d67d6ce95c3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-03-21 11:19:42 +01:00

19 lines
511 B
C++

// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtWidgets/qapplication.h>
#include "primecounter.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
app.setOrganizationName("QtProject");
app.setApplicationName(QApplication::translate("main", "Prime Counter"));
PrimeCounter dialog;
dialog.setWindowTitle(QApplication::translate("main", "Prime Counter"));
dialog.show();
return app.exec();
}