Answer the question
In order to leave comments, you need to log in
How to get rid of soapy fonts in QtQuick?
I always noticed that when using QtQuick , fonts are rendered terribly poorly - everything is blurry and unreadable, it strains both eyes and nerves.
Now it was necessary to use the QtWebEngineWidgets module in the widgets , and it, the infection, pulls Quick along with it, apparently cef is drawn through QML. Well, to hell with it, let it be drawn like this, but only when QtWebEngine is activated, the entire application turns into a blurry mass.
Here are 2 screenshots:
1. Before creating the QWebEngineView instance
2. After creating the QWebEngineView instance Is
there a cure for this blurriness?
Project code:
#include <QApplication>
#include <QWebEngineView>
#include <QBoxLayout>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QTimer>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget *window = new QWidget;
window->setLayout(new QVBoxLayout);
window->resize(800,600);
QWidget *bar = new QWidget(window);
bar->setLayout(new QHBoxLayout);
bar->layout()->addWidget(new QLabel("Это QLabel"));
bar->layout()->addWidget(new QLineEdit("Это QLineEdit"));
bar->layout()->addWidget(new QPushButton("Это QPushButton"));
bar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
QWidget *centralWidget = new QWidget(window);
centralWidget->setLayout(new QVBoxLayout);
window->layout()->addWidget(bar);
window->layout()->addWidget(centralWidget);
QTimer::singleShot(5000, centralWidget, [=](){
QWebEngineView *view = new QWebEngineView(centralWidget);
view->load(QUrl("https://toster.ru/q/650932"));
centralWidget->layout()->addWidget(view);
view->show();
});
window->show();
return a.exec();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question