Answering my own question, but I followed this tutorial to get cross-compilation of qt4 applicatins working outside qtcreator:
hertaville.com/2014/04/12/cross-compiling-qt4-app/
Then, instead of using the Makefile in that tutorial, I copied a mkspecs directory and edited its qmake.conf for the same configuration options:
#
# qmake configuration for linux-arm-g++
#
CROSS_COMPILE = arm-linux-gnueabihf
ROOTFS = /home/davethomaspilot/rpi/mntrpi
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_$
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QMAKE_CXX = $$CROSS_COMPILE-g++
QMAKE_LINK = $$CROSS_COMPILE-g++
QMAKE_LINK_SHLIB = $$CROSS_COMPILE-g++
QMAKE_AR = $$CROSS_COMPILE-ar cr
QMAKE_OBJCOPY = $$CROSS_COMPILE-objcopy
QMAKE_STRIP = $$CROSS_COMPILE-strip
QMAKE_LFLAGS_RELEASE = -Wl,-O1
QMAKE_RPATHDIR += $$ROOTFS/lib/arm-linux-gnueabihf
QMAKE_RPATHDIR += $$ROOTFS/usr/lib/arm-linux-gnueabihf
QMAKE_INCDIR = $$ROOTFS/usr/include
QMAKE_INCDIR_QT = $$ROOTFS/usr/include/qt4
QMAKE_RPATHDIR = $$ROOTFS/lib/arm-linux-gnueabihf
QMAKE_RPATHDIR += $$ROOTFS/usr/lib/arm-linux-gnueabihf
QMAKE_LIBDIR = $$ROOTFS/usr/lib
QMAKE_LIBDIR_QT = $$ROOTFS/usr/lib/arm-linux-gnueabihf
QMAKE_LIBDIR_QT += $$ROOTFS/lib/arm-linux-gnueabihf
QMAKE_INCDIR_X11 = $$ROOTFS/usr/include
QMAKE_LIBDIR_X11 = $$ROOTFS/usr/lib/arm-linux-gnueabihf
QMAKE_LIBDIR_X11 += $$ROOTFS/lib/arm-linux-gnueabihf
QMAKE_INCDIR_OPENGL = $$ROOTFS/usr/include
QMAKE_LIBDIR_OPENGL = $$ROOTFS/usr/lib
load(qt_config)
#
# qmake configuration for linux-arm-g++
#
CROSS_COMPILE = arm-linux-gnueabihf
ROOTFS = /home/davethomaspilot/rpi/mntrpi
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_$
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QMAKE_CXX = $$CROSS_COMPILE-g++
QMAKE_LINK = $$CROSS_COMPILE-g++
QMAKE_LINK_SHLIB = $$CROSS_COMPILE-g++
QMAKE_AR = $$CROSS_COMPILE-ar cr
QMAKE_OBJCOPY = $$CROSS_COMPILE-objcopy
QMAKE_STRIP = $$CROSS_COMPILE-strip
QMAKE_LFLAGS_RELEASE = -Wl,-O1
QMAKE_RPATHDIR += $$ROOTFS/lib/arm-linux-gnueabihf
QMAKE_RPATHDIR += $$ROOTFS/usr/lib/arm-linux-gnueabihf
QMAKE_INCDIR = $$ROOTFS/usr/include
QMAKE_INCDIR_QT = $$ROOTFS/usr/include/qt4
QMAKE_RPATHDIR = $$ROOTFS/lib/arm-linux-gnueabihf
QMAKE_RPATHDIR += $$ROOTFS/usr/lib/arm-linux-gnueabihf
QMAKE_LIBDIR = $$ROOTFS/usr/lib
QMAKE_LIBDIR_QT = $$ROOTFS/usr/lib/arm-linux-gnueabihf
QMAKE_LIBDIR_QT += $$ROOTFS/lib/arm-linux-gnueabihf
QMAKE_INCDIR_X11 = $$ROOTFS/usr/include
QMAKE_LIBDIR_X11 = $$ROOTFS/usr/lib/arm-linux-gnueabihf
QMAKE_LIBDIR_X11 += $$ROOTFS/lib/arm-linux-gnueabihf
QMAKE_INCDIR_OPENGL = $$ROOTFS/usr/include
QMAKE_LIBDIR_OPENGL = $$ROOTFS/usr/lib
load(qt_config)
To copy to clipboard, switch view to plain text mode
Then, as Wysota suggested in another thread, I used the -spec qmake option to specify the new "linux-arm-g++" mkspec.
Works great and now I get fast compile times, less than a minute on my W520 laptop versus over 10 minutes using native compile on the rpi.
Bookmarks