Open JayFoxRox opened 3 years ago
This is related to the timers somehow. I assume the timer event somehow takes away the GL context?
Oddly enough, disabling the code inside the void MainWindow::timerEvent(QTimerEvent* event)
is not enough.
However, this is a functional workaround:
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index a6ec52e..596dc2a 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -196,10 +196,12 @@ void MainWindow::onNewProject()
void MainWindow::onOpen()
{
+ killTimer(_gameLoopTimerId);
QString fileName = QFileDialog::getOpenFileName(nullptr,
tr("Open Flow Scene"),
QDir::currentPath(),
tr("Flow Scene Files (*.flow)"));
+ _gameLoopTimerId = startTimer(0);
if (!QFileInfo::exists(fileName))
return;
@@ -227,10 +229,12 @@ void MainWindow::onOpen()
void MainWindow::onSaveAs()
{
+ killTimer(_gameLoopTimerId);
QString fileName = QFileDialog::getSaveFileName(nullptr,
tr("Open Flow Scene"),
QDir::currentPath(),
tr("Flow Scene Files (*.flow)"));
+ _gameLoopTimerId = startTimer(0);
if (!fileName.isEmpty())
{
The problem mentioned in https://github.com/fredakilla/spkgen/blob/master/README.md#build does still exist in Qt 5.15 I strongly suspect this is a problem in Spkgen, not in Qt5.