Replaced depecated QPainter::initFrom by QPainter::begin

This commit is contained in:
thunder2 2025-07-22 23:38:53 +02:00
parent 9ebc4b00ed
commit 21174aa5d7
5 changed files with 6 additions and 6 deletions

View file

@ -84,7 +84,7 @@ void FileTransferInfoWidget::updateDisplay()
setFixedHeight(maxHeight);
QPainter painter(&pixmap);
painter.initFrom(this);
painter.begin(this);
float S = QFontMetricsF(font()).height();
int chunk_square_size = S*chunk_square_size_factor;

View file

@ -268,7 +268,7 @@ void GlobalRouterStatisticsWidget::updateContent()
setFixedHeight(maxHeight);
QPainter painter(&tmppixmap);
painter.initFrom(this);
painter.begin(this);
painter.setPen(QColor::fromRgb(0,0,0)) ;
QFont times_f(font());//"Times") ;

View file

@ -258,7 +258,7 @@ void GxsIdStatisticsWidget::updateContent()
setFixedHeight(mMaxHeight);
QPainter painter(&tmppixmap);
painter.initFrom(this);
painter.begin(this);
painter.setPen(QColor::fromRgb(0,0,0)) ;
QFont times_f(font());//"Times") ;

View file

@ -402,7 +402,7 @@ void GxsAuthenticatedTunnelsDialog::updateDisplay()
//setFixedHeight(maxHeight);
QPainter painter(&tmppixmap);
painter.initFrom(this);
painter.begin(this);
// extracts the height of the fonts in pixels. This is used to calibrate the size of the objects to draw.
@ -576,7 +576,7 @@ void GxsNetTunnelsDialog::updateDisplay()
//setFixedHeight(maxHeight);
QPainter painter(&tmppixmap);
painter.initFrom(this);
painter.begin(this);
// extracts the height of the fonts in pixels. This is used to calibrate the size of the objects to draw.

View file

@ -296,7 +296,7 @@ void TurtleRouterStatisticsWidget::updateTunnelStatistics(const std::vector<std:
setFixedHeight(maxHeight);
QPainter painter(&tmppixmap);
painter.initFrom(this);
painter.begin(this);
// extracts the height of the fonts in pixels. This is used to callibrate the size of the objects to draw.