Re: [Interest] [Qt3D] QAbstractCameraController & escape key

2018-08-07 Thread Andy
I filed a bug report:

   https://bugreports.qt.io/browse/QTBUG-69802

I couldn't figure out how to turn it off through the public API, but I did
come up with a fragile hack to turn it off.

In your inherited camera controller (or, subclass one of the existing ones):

// Find and delete the escape key QActionInput.

// This is a workaround for the change to QAbstractCameraController in Qt 5.11

// which added an escape key handler that performs a "view all" on the scene.

//   https://codereview.qt-project.org/#/c/226879/

//   https://bugreports.qt.io/browse/QTBUG-69802
void inheritedCameraController::_deleteEscapeHandler()

{

   QList   list =
findChildren();


   for ( auto actionInput : list )

   {

  if ( actionInput->buttons().count() != 1 )

  {

 continue;

  }


  if ( actionInput->buttons().at( 0 ) == Qt::Key_Escape )

  {

 delete actionInput;

  }

   }

}


---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney 



On Wed, Aug 1, 2018 at 6:10 PM Andy  wrote:

> Back in April, a commit added the functionality that the escape key does a
> "view all" on the scene.
>
>  https://codereview.qt-project.org/#/c/226879/
>
> How do I prevent this? I can't figure out a way to turn it off/override it
> in my derived camera controller.
>
> I have a ground plane and a model in the middle of it and when the user
> hits escape it zooms the camera way out and it looks terrible (and it's
> confusing).
>
> This feels like an application-specific functionality that doesn't belong
> in this abstract base class.
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney 
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] QAbstractCameraController & escape key

2018-08-01 Thread Andy
Back in April, a commit added the functionality that the escape key does a
"view all" on the scene.

 https://codereview.qt-project.org/#/c/226879/

How do I prevent this? I can't figure out a way to turn it off/override it
in my derived camera controller.

I have a ground plane and a model in the middle of it and when the user
hits escape it zooms the camera way out and it looks terrible (and it's
confusing).

This feels like an application-specific functionality that doesn't belong
in this abstract base class.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest