История изменений
Исправление pashazz, (текущая версия) :
к сожалению, проблема не решена. Сегфолт.
0 QString::replace(QChar const*, int, QChar const*, int, Qt::CaseSensitivity) QString::replace(QChar const*, int, QChar const*, int, Qt::CaseSensitivity) 0x100ec75ac
1 QString::replace(QLatin1String, QString const&, Qt::CaseSensitivity) QString::replace(QLatin1String, QString const&, Qt::CaseSensitivity) 0x100ec7f06
2 QProgressBar::text() const QProgressBar::text() const 0x100342ae2
3 QProgressBar::initStyleOption(QStyleOptionProgressBar*) const QProgressBar::initStyleOption(QStyleOptionProgressBar*) const 0x100341f9d
4 QProgressBarPrivate::repaintRequired() const QProgressBarPrivate::repaintRequired() const 0x10034210e
5 QProgressBar::setValue(int) QProgressBar::setValue(int) 0x100342676
6 MainWindow::trackProgress(int) mainwindow.cpp 128 0x10000709f
7 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (MainWindow::*)(int)>::call(void (MainWindow::*)(int), MainWindow*, void**) qobjectdefs_impl.h 500 0x100008d38
8 void QtPrivate::FunctionPointer<void (MainWindow::*)(int)>::call<QtPrivate::List<int>, void>(void (MainWindow::*)(int), MainWindow*, void**) qobjectdefs_impl.h 519 0x100008c90
9 QtPrivate::QSlotObject<void (MainWindow::*)(int), QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobject_impl.h 143 0x100008ac8
10 QObject::event(QEvent*) QObject::event(QEvent*) 0x10106d5c3
11 QWidget::event(QEvent*) QWidget::event(QEvent*) 0x10020aacd
12 QMainWindow::event(QEvent*) QMainWindow::event(QEvent*) 0x10030d191
13 QApplicationPrivate::notify_helper(QObject*, QEvent*) QApplicationPrivate::notify_helper(QObject*, QEvent*) 0x1001cadbb
14 QApplication::notify(QObject*, QEvent*) QApplication::notify(QObject*, QEvent*) 0x1001ce110
15 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) 0x101042c8b
16 QCocoaEventDispatcherPrivate::processPostedEvents() QCocoaEventDispatcherPrivate::processPostedEvents() 0x10342d1be
17 QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x10342c6ff
18 MainWindow::trackProgress(int) mainwindow.cpp 129 0x1000070be
19 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (MainWindow::*)(int)>::call(void (MainWindow::*)(int), MainWindow*, void**) qobjectdefs_impl.h 500 0x100008d38
сделал так:
connect(worker, &Worker::reportProgress, this, &MainWindow::trackProgress, Qt::QueuedConnection);
void MainWindow::trackProgress(int x)
{
bar->setValue(x);
qApp->processEvents();
}
Без последней строчки все работает, но GUI не отвечает.
Исходная версия pashazz, :
к сожалению, проблема не решена. Сегфолт.
0 QString::replace(QChar const*, int, QChar const*, int, Qt::CaseSensitivity) QString::replace(QChar const*, int, QChar const*, int, Qt::CaseSensitivity) 0x100ec75ac
1 QString::replace(QLatin1String, QString const&, Qt::CaseSensitivity) QString::replace(QLatin1String, QString const&, Qt::CaseSensitivity) 0x100ec7f06
2 QProgressBar::text() const QProgressBar::text() const 0x100342ae2
3 QProgressBar::initStyleOption(QStyleOptionProgressBar*) const QProgressBar::initStyleOption(QStyleOptionProgressBar*) const 0x100341f9d
4 QProgressBarPrivate::repaintRequired() const QProgressBarPrivate::repaintRequired() const 0x10034210e
5 QProgressBar::setValue(int) QProgressBar::setValue(int) 0x100342676
6 MainWindow::trackProgress(int) mainwindow.cpp 128 0x10000709f
7 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (MainWindow::*)(int)>::call(void (MainWindow::*)(int), MainWindow*, void**) qobjectdefs_impl.h 500 0x100008d38
8 void QtPrivate::FunctionPointer<void (MainWindow::*)(int)>::call<QtPrivate::List<int>, void>(void (MainWindow::*)(int), MainWindow*, void**) qobjectdefs_impl.h 519 0x100008c90
9 QtPrivate::QSlotObject<void (MainWindow::*)(int), QtPrivate::List<int>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobject_impl.h 143 0x100008ac8
10 QObject::event(QEvent*) QObject::event(QEvent*) 0x10106d5c3
11 QWidget::event(QEvent*) QWidget::event(QEvent*) 0x10020aacd
12 QMainWindow::event(QEvent*) QMainWindow::event(QEvent*) 0x10030d191
13 QApplicationPrivate::notify_helper(QObject*, QEvent*) QApplicationPrivate::notify_helper(QObject*, QEvent*) 0x1001cadbb
14 QApplication::notify(QObject*, QEvent*) QApplication::notify(QObject*, QEvent*) 0x1001ce110
15 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) 0x101042c8b
16 QCocoaEventDispatcherPrivate::processPostedEvents() QCocoaEventDispatcherPrivate::processPostedEvents() 0x10342d1be
17 QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x10342c6ff
18 MainWindow::trackProgress(int) mainwindow.cpp 129 0x1000070be
19 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (MainWindow::*)(int)>::call(void (MainWindow::*)(int), MainWindow*, void**) qobjectdefs_impl.h 500 0x100008d38
сделал так:
connect(worker, &Worker::reportProgress, this, &MainWindow::trackProgress, Qt::QueuedConnection);
void MainWindow::trackProgress(int x)
{
bar->setValue(x);
qApp->processEvents();
}