How to find VRED's QMainWindow

How to find VRED's QMainWindow

christian_aubert
Contributor Contributor
1,024 Views
3 Replies
Message 1 of 4

How to find VRED's QMainWindow

christian_aubert
Contributor
Contributor

I've tried the sample code mentioned in this post:

vred shortcuts vs focus - Autodesk Community - VRED

 

QtCore.QCoreApplication.instance().vrMainWindow.findChildren(QtWidgets.QWidget, 'Render')

 

but that errors out with:

 

 

AttributeError: 'PySide6.QtWidgets.QApplication' object has no attribute 'vrMainWindow'

 

How can I find VRED's QMainWindow? 

0 Likes
Accepted solutions (2)
1,025 Views
3 Replies
Replies (3)
Message 2 of 4

sinje_thiedemann
Autodesk
Autodesk
Accepted solution

Hi,

 

simply use this function to get VRED's QMainWindow:

vredMainWindow()

 

Message 3 of 4

christian_aubert
Contributor
Contributor

Works great.

 

Closest result when I google "vredMainWindow()" is VRED 2023 Help | vrVredUi | Autodesk

 

How can I find that in the documentation instead of hitting the forums everytime?

0 Likes
Message 4 of 4

__daniel.lincoln__
Alumni
Alumni
Accepted solution

Hi Christian,

 

I like to use Notepad++ Search, Find in Files... to locate example usages in the VRED example folder(s).