RV Custom Preferences Tab Example

Anyone have an example of building your own RV preferences tab in the preferences window?

When I was at ADSK I know I sent a few of you an example of that, but I failed to publish it before I left.


1 Like

Hi @Michael.Kessler,

You can bind on preferences-show event and search all of the Qt widgets for all the dialogs to get to the Preferences tab. Here’s some starter code to add a new tab to the Preferences:

from PySide import QtCore, QtGui
import rv

# Get the top level session window
session = rv.qtutils.sessionWindow()

# Search through all the dialogs and get the one named RvPreferences
rvPrefs = session.findChild(QtGui.QDialog, "RvPreferences")

# We want to amend a tab, so find the 'tabWidget' object.
# As a simple example, I'm just adding a button, but you can do
# your whole layout here.
tabWidget = rvPrefs.findChild(QtGui.QTabWidget, "tabWidget")

# Button
b = QtGui.QPushButton("push me", tabWidget)



Ahhh thank you so much! I realize we had to do it that way because there’s no Python equivlent to commands.prefTabWidget in Python. It would be great to have a qtutils method for this without searching.

Thanks for the help, I hope this serves as a useful item for others!


Agreed! I’ll let the team know that you’re still interested in a prefTabWidget command!