Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change tooltip window flags #7613

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/gui/widgets/TextFloat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "TextFloat.h"

#include <QCoreApplication>
#include <QTimer>
#include <QPainter>
#include <QStyleOption>
Expand All @@ -44,7 +45,7 @@ TextFloat::TextFloat() :
}

TextFloat::TextFloat(const QString & title, const QString & text, const QPixmap & pixmap) :
QWidget(getGUI()->mainWindow(), Qt::ToolTip)
QWidget(getGUI()->mainWindow(), Qt::Tool | Qt::FramelessWindowHint)
{
QHBoxLayout * mainLayout = new QHBoxLayout();
setLayout(mainLayout);
Expand Down Expand Up @@ -124,6 +125,8 @@ TextFloat * TextFloat::displayMessage(const QString & title,
QTimer::singleShot(timeout, tf, SLOT(close()));
}

QCoreApplication::processEvents();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this is the wrong place to fix the problem. Instead the problem(s) should be fixed in the places where long running operations are performed in the GUI main thread, e.g. in the VST loading code, etc.

The TextFloat as is works perfectly okay and you would see similar problems with other widgets if they are about to be shown before something that blocks the GUI main thread.


return tf;
}

Expand Down
Loading