Qt6: Fix QMouseEvent.x() and .y() deprecation.

This commit is contained in:
Kristian Bendiksen
2024-10-02 11:03:10 +02:00
parent a04d41b043
commit 835cf4a53c
10 changed files with 40 additions and 37 deletions

View File

@@ -1076,8 +1076,8 @@ void RiuViewer::mouseMoveEvent( QMouseEvent* mouseEvent )
RimViewLinker* viewLinker = m_rimView->assosiatedViewLinker();
if ( viewLinker )
{
int translatedMousePosX = mouseEvent->pos().x();
int translatedMousePosY = height() - mouseEvent->pos().y();
int translatedMousePosX = mouseEvent->position().x();
int translatedMousePosY = height() - mouseEvent->position().y();
cvf::Vec3d displayCoord( 0, 0, 0 );
if ( mainCamera()->unproject( cvf::Vec3d( static_cast<double>( translatedMousePosX ), static_cast<double>( translatedMousePosY ), 0 ),

View File

@@ -139,11 +139,11 @@ void RiuWellLogTrack::onMouseMoveEvent( QMouseEvent* mouseEvent )
double depth = 0.0;
if ( depthTrackPlot->depthOrientation() == RiaDefines::Orientation::HORIZONTAL )
{
depth = axisMap.invTransform( mouseEvent->pos().x() );
depth = axisMap.invTransform( mouseEvent->position().x() );
}
else
{
depth = axisMap.invTransform( mouseEvent->pos().y() );
depth = axisMap.invTransform( mouseEvent->position().y() );
}
depthTrackPlot->setDepthMarkerPosition( depth );