How to build Qt 5.15.2 for Vortex Studio


Vortex Studio uses Qt's technologies for creating its multiple user interfaces. Several Qt pages show how to build Qt 5.15 with third parties (

In Vortex Studio, Qt 5.15.2 source is specifically linked with additional versions of Perl and XCB libraries (for Linux build)  and built into binary libraries with specific Qt's configurations. Changes were made to fix some small issues found in this version of the source code. The changes are listed in the section Patches for Qt 5.15.2 used in Vortex Studio.

The following sections detail steps by steps on how to build Qt 5.15.2.

System requirements

  • VS2019 C++ compiler
  • Python 2.7

Package downloads

  • Perl for windows (strawberry-perl-

Build Qt 5.15.2 for Windows

1) Run strawberry-perl- to install

2) Create a folder (e.g. c:\qt515_for_windows)

3) Unzip the content of Qt 5.15.2 package to a specified folder (e.g. c:\qt515_for_windows\qt5.15.2)

4) Apply patches listed in the section Patches for Qt 5.15.2 used in Vortex Studio.

5) Create a file named Makefile in the folder created in step #2 with this content

Makefile for building Qt5.15.2 for Windows
CURRENTDIR:=$(shell pwd)

makeit: qt515 ;

export INCLUDE:=$(CURRENTDIR)\stage_qt5_$(TOOLCHAIN)\include;$(INCLUDE)
export LIB:=$(CURRENTDIR)\stage_qt5_$(TOOLCHAIN)\lib;$(LIB)

	(mkdir build_qt5_$(TOOLCHAIN) & cd build_qt5_$(TOOLCHAIN) && \
	$(CURRENTDIR)\qt5.15.2\configure -debug-and-release -force-debug-info -recheck -shared -opensource -confirm-license -no-system-proxies -openssl -opengl desktop -skip qtwebengine -nomake tests -nomake examples -prefix $(CURRENTDIR)\stage_qt5_$(TOOLCHAIN))

.PHONY: qt515

7) Open the tools command prompt for VS2015 x64 as administrator

8) Run

       > make

Build Qt 5.15.1 for Linux

Linux still uses 5.15.1. Follow the download instruction but replace 5.15.2 for 5.15.1.

1) Make sure Perl is installed. Type the following to find out which version

      > perl -v

2) Create a folder (e.g. c:\qt515_for_windows)

3) Start a Terminal

4) Unzip the content of Qt5.15.1 package to a specified folder (e.g. c:\qt515_for_windows\qt5.15.1)

5) Apply patches listed in the section Patches for Qt 5.15.1 used in Vortex Studio.

6) Execute the following commands:

       > cd c:\qt515_for_windows\qt5.15.1

       > find ./ -type f -exec dos2unix {} \;

               > sudo su -

               > yum install libxcb libxcb-devel xcb-util xcb-util-devel libxkbcommon-devel libxkbcommon-x11-devel xcb-util-keysyms-devel xcb-util-wm-devel xcb-util-image-devel xcb-util-renderutil-devel mesa-libGL-devel

7) Create a file named Makefile in the folder created in step #2 with this content

Makefile for building Qt5.15.1 for Linux
CURRENTDIR:=$(shell pwd)

makeit: qt515 ;

export INCLUDE:=$(CURRENTDIR)/stage_qt5_$(TOOLCHAIN)/include;$(INCLUDE)
export LIB:=$(CURRENTDIR)/stage_qt5_$(TOOLCHAIN)/lib;$(LIB)

	(mkdir -p build_qt5_$(TOOLCHAIN) && cd build_qt5_$(TOOLCHAIN) && \
	chmod +x $(CURRENTDIR)/qt5/configure && \
	chmod +x $(CURRENTDIR)/qt5/qtbase/configure && \
	$(CURRENTDIR)/qt5.15.1/configure -shared -opensource -confirm-license -xcb -xcb-xlib -bundled-xcb-xinput -no-system-proxies -openssl -opengl desktop -skip qtwebengine -nomake tests -nomake examples -prefix $(CURRENTDIR)/stage_qt5_$(TOOLCHAIN) && \
	$(MAKE) && \
	$(MAKE) install)

.PHONY: qt515

7) Run

        > make

Patches for Qt 5.15.2 used in Vortex Studio

The following changes were made in the original Qt 5.15.2 source to fix some small issues found in the source.

1) Patch #1: 


line 201: Added a check for valid qGuiApp 

New code
if (qGuiApp && QThread::currentThread() != qGuiApp->thread())

2) Patch #2:


Line 1156: Use a copy of extraData→eventFilters

New code
bool QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject *receiver, QEvent *event)
    if (extraData) {
        auto eventFiltersCopy = extraData->eventFilters;
        // application event filters are only called for objects in the GUI thread
        for (int i = 0; i < eventFiltersCopy.size(); ++i) {
            QObject *obj =;
            if (!obj)
            if (obj->d_func()->threadData != threadData) {
                qWarning("QCoreApplication: Application event filter cannot be in a different thread.");
            if (obj->eventFilter(receiver, event))
                return true;
    return false;

3) Patch #3:


Line 55: Change made to QT_MAX_CACHED_GLYPH_SIZE

New code


Line 221: in the function QAccessibleButton::role(), added a check for valid ab variable

New code
QAccessible::Role QAccessibleButton::role() const
    QAbstractButton *ab = button();
    if (ab) {
#if QT_CONFIG(menu)
        if (QPushButton *pb = qobject_cast<QPushButton*>(ab)) {
            if (pb->menu())
                return QAccessible::ButtonMenu;
        if (ab->isCheckable())
            return ab->autoExclusive() ? QAccessible::RadioButton : QAccessible::CheckBox;
    return QAccessible::Button;

Line 346: in the function QAccessibleToolButton::role(), added a check for valid ab variable

New code
QAccessible::Role QAccessibleToolButton::role() const
#if QT_CONFIG(menu)
    QAbstractButton *ab = button();
    if (ab) {
        QToolButton *tb = qobject_cast<QToolButton *>(ab);
        if (!tb->menu())
            return tb->isCheckable() ? QAccessible::CheckBox : QAccessible::PushButton;
        else if (tb->popupMode() == QToolButton::DelayedPopup)
            return QAccessible::ButtonDropDown;

    return QAccessible::ButtonMenu;

4) Patch #4: 


Line 5827 & 5828: Replace these 2 lines with the following:

New code
            if (rule.hasBox() || !rule.hasNativeBorder()) {
                return visualRect(opt->direction, opt->rect, se == SE_PushButtonBevel
                                                                ? rule.borderRect(opt->rect)
                                                                : rule.contentsRect(opt->rect));