Setting up dev environment for tk-multi-starterapp on MacOS

Im trying to set up a dev environment to run the file so that I can customize the UI using QtDesigner. I cant seem to get the right combination of qt and pyside tools installed to be able to run the sh script. Do you have a procedure you can share?

This is my current process:

brew install qt5
brew link qt5 --force
(switch into a py2.7 venv)
pip install PySide

It fails during this PySide install, complains about Qt QTGUI, Qt QTXML, Qt QTCORE libraries not being found.

Update on this - I’ve given up trying to successfully install PySide. PySide2 installs without issue using pip install PySide2 so now I’m attempting to modify the to use the pyside2-uic and pyside2-rcc. Here is my modified script:

# The path to output all built .py files to:

# Helper functions to build UI files
function build_qt {
    echo " > Building " $2

    # compile ui to python
    $1 $2 -o $UI_PYTHON_PATH/$

    # replace PySide imports with tank.platform.qt and remove line containing Created by date
    sed -i "" -e "s/from PySide2 import/from sgtk.platform.qt5 import/g" -e "/# Created:/d" $UI_PYTHON_PATH/$
    sed -i "" -e "s/from PySide2./from sgtk.platform.qt5./g" -e "/# Created:/d" $UI_PYTHON_PATH/$

function build_ui {
    build_qt "pyside2-uic --from-imports" "$1.ui" "$1"

function build_res {
    build_qt "pyside2-rcc" "$1.qrc" "$1_rc"

# build UI's:
echo "building user interfaces..."
build_ui dialog
# add any additional .ui files you want converted here!

# build resources
echo "building resources..."
build_res resources

This works BUT there’s an issue with the way sgtk imports Qt that I cannot import it the way the complier writes out the imports. This doesnt work:

from sgtk.platform.qt5.QtCore import *
from sgtk.platform.qt5.QtGui import *
from sgtk.platform.qt5.QtWidgets import *

I get a ImportError: No module named QtCore error. So is there either 1) a way to run the UIC so that the compiled UI would work with imports like from sgtk.platform.qt5 import QtCore, QtGui, QtWidgets or 2) modfiy the import statement to import all the Qt modules as if it was done with a import * type statement?

inserting import sgtk.platform.qt5 as PySide2 seems to do the trick. Like this:

import sgtk.platform.qt5 as PySide2

from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *

So I’ve run into an issue with this method. Using pyside2-rcc doesnt seem to build a file that works. None of the images contained in that resource file appear in the compiled app. If i use the old resource file compiled by SG using pyside-rcc the images appear fine. This is of course an issue because I cant add or change any resources or ALL my images disappear.

Help! How do I set up a proper environment for this? I want to develop some apps!