Utility to browse the Qt object tree of a running Qt application and edit object properties on the fly.
C++ CMake Protocol Buffer C
Latest commit cce98a1 Dec 2, 2016 @robertknight committed on GitHub Merge pull request #12 from romanzoller/readme-protoc
Add a note about protoc
Permalink
Failed to load latest commit information.
lib Add missing checks for destroyed objects Feb 20, 2014
.gitignore Add .gitignore file. Jul 18, 2011
CMakeLists.txt Update CMakeLists.txt Oct 5, 2015
COPYRIGHT Add README and COPYRIGHT files. Jul 17, 2011
ExternalObjectProxy.cpp Add 'Refresh Object' action to refresh the property list for the curr… Nov 8, 2013
ExternalObjectProxy.h Add 'Refresh Object' action to refresh the property list for the curr… Nov 8, 2013
ExternalWidgetPicker.cpp Use QSharedPointer to manage the lifetime of ObjectProxy and subclasses. Jul 17, 2011
ExternalWidgetPicker.h Restructure source tree and tidy up CMakeLists.txt Nov 8, 2013
GdbLibraryInjector.cpp Search for libQtInspector.so in cwd first, then in LD_LIBRARY_PATH Jul 22, 2011
GdbLibraryInjector.h Add simpler injector which uses shared library preloading Nov 8, 2013
Injector.h Add simpler injector which uses shared library preloading Nov 8, 2013
ObjectFilter.cpp Use QSharedPointer to manage the lifetime of ObjectProxy and subclasses. Jul 17, 2011
ObjectFilter.h Restructure source tree and tidy up CMakeLists.txt Nov 8, 2013
ObjectInspector.cpp Support building against either Qt 4 or Qt 5 Nov 12, 2013
ObjectInspector.h Support building against either Qt 4 or Qt 5 Nov 12, 2013
ObjectPropertyModel.cpp Add 'Refresh Object' action to refresh the property list for the curr… Nov 8, 2013
ObjectPropertyModel.h Add 'Refresh Object' action to refresh the property list for the curr… Nov 8, 2013
ObjectTreeModel.cpp Support building against either Qt 4 or Qt 5 Nov 12, 2013
ObjectTreeModel.h Get Qt Inspector compiling under Windows Nov 12, 2013
OutOfProcessClipboard.cpp Initial import of Qt Widget inspector from Mendeley Desktop source tree. Jul 10, 2011
OutOfProcessClipboard.h Initial import of Qt Widget inspector from Mendeley Desktop source tree. Jul 10, 2011
PreloadInjector.cpp Skip empty entries when prepending to library preload list Nov 8, 2013
PreloadInjector.h Add simpler injector which uses shared library preloading Nov 8, 2013
README.md Add a note about protoc Nov 30, 2016
RootObjectList.h Restructure source tree and tidy up CMakeLists.txt Nov 8, 2013
TargetApplicationProxy.cpp Restructure source tree and tidy up CMakeLists.txt Nov 8, 2013
TargetApplicationProxy.h Restructure source tree and tidy up CMakeLists.txt Nov 8, 2013
WidgetInspector.cpp Support building against either Qt 4 or Qt 5 Nov 12, 2013
WidgetInspector.h Get Qt Inspector compiling under Windows Nov 12, 2013
WidgetInspectorShortcut.cpp Get 'Refresh' button in the inspector working. Jul 16, 2011
WidgetInspectorShortcut.h Support building against either Qt 4 or Qt 5 Nov 12, 2013
libQtInspectorExport.h Get Qt Inspector compiling under Windows Nov 12, 2013
main.cpp Fix QtInspector failing to locate shared library on Linux Feb 19, 2014

README.md

Qt Inspector

Qt Inspector is a tool to browse the object/widget tree of Qt applications.

Screenshot

Qt Inspector starts a specified application or connects to a specified process and once connected it can:

  • Browse the object tree of Qt applications.
  • View properties of objects
  • Edit properties of objects
  • Locate a widget in the object tree by clicking on it in the application

Building Qt inspector

Qt Inspector currently runs on Linux and Mac.

You will need protoc in your PATH. On Debian/Ubuntu, install protobuf-compiler.

    cmake <path to Qt inspector src>
    make -j2

Usage

Qt Inspector can either attach to an existing application or launch a specified application and then attach to it.

Recommended usage is to specify the program name and arguments.

    ./qtinspector <program name> <args>
    ./qtinspector <process ID of running Qt app>

Design

Qt Inspector operates by injecting a helper library into the target process when starting it using LD_PRELOAD / DYLD_INSERT_LIBRARIES or via gdb (if attaching to an existing process).

This helper library sets up a local socket and listens for requests from the inspector process. The inspector and target process communicate via protocol buffer messages over this socket.