.PRI

PRI File

Qt Project Include File
Ask a question
QUICK ANSWER

A .pri file is a Qt Project Include file - a plain-text script for the qmake build system that holds build settings (source files, headers, include paths) shared across Qt C++ projects. Open it in any text editor or in Qt Creator. It is not an image file, and it is safe to read.

Developer: The Qt Company (originally Trolltech / Nokia / Digia) Category: Developer Files Open standard MIME: text/plain
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Aug 3, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the PRI file format?

.pri is a file format associated with the Qt development environment. .pri files store compiler settings and qmake parameters - variable assignments such as SOURCES +=, HEADERS +=, INCLUDEPATH +=, and DEFINES that control how a project is built. .pri files also contain references to other project files and target system information. Although .pri files store information in plain text, such files should not be edited without a working knowledge of the Qt framework and qmake syntax.

A .pri file is a reusable build-script fragment, not a standalone project. It is pulled into a parent .pro project file via the include() directive, allowing shared build settings to be modularised and reused across multiple subprojects without duplicating code.

Qt is a software development environment and framework for building graphical user interfaces. Qt is a multi-platform tool that offers many advanced development tools, running on Windows, macOS, Linux, and embedded systems. It is available under open-source (LGPL) and commercial licences. Qt project build settings, including .pri include files, are stored in plain text and can be shared and reused across multiple projects.

Starting with Qt 6, CMake has become the recommended build system, and .pri files are gradually being phased out in favour of .cmake include files. Existing projects that use .pri files continue to work under qmake, which remains bundled with Qt 6.

Security & safety

RISK: LOW

A .pri is a plain-text build script, so the file itself is harmless to open and read. The only caution applies when building untrusted source: qmake scripts can run shell commands (via system() or custom build steps), so do not build a downloaded project you do not trust without reviewing its .pro/.pri files first.

Format details

in a nutshell
FULL NAMEQt Project Include Fileaka qmake include file, Qt .pri file
DEVELOPERThe Qt Company (originally Trolltech / Nokia / Digia)since Early 2000s (qmake build system, part of Qt)
MIME TYPEtext/plain
TYPEqmake project-include script (text)
STANDARDOpen · royalty-free
This extension is also used by…
  • Windows Package Resource Index (resources.pri) - Compiled binary resource index in UWP/MSIX Windows apps, built by MakePRI - unrelated to Qt and not a text file.
  • Oracle Primavera / 'priority' data files - Various unrelated apps use .pri for priority or project data; niche.

Programs that open PRI files

Windows3 apps
Notepad Open-source Open the file to read/edit the plain-text qmake script.
Qt Creator Freemium Open the parent .pro project in Qt Creator; .pri files appear in the project tree and edit with syntax highlighting.
Visual Studio Code Free Open the file or its folder; reads/edits the qmake text directly (Qt extensions add highlighting).
macOS2 apps
Qt Creator Freemium Open the .pro project; .pri include files are managed in the project tree.
Visual Studio Code Free Open the file/folder to edit the qmake text.
Linux2 apps
Qt Creator Freemium Install via the distro or the Qt installer; open the .pro and edit the .pri in the project tree.
any text editor (Vim, nano, Kate, gedit) Open-source It is plain text - open and edit with any editor.

Technical details

deep spec
Full nameQt Project Include File
MIME typetext/plain
EncodingUTF-8 or ASCII
Typical file sizeUnder 1 KB to a few KB
Key build variablesSOURCES, HEADERS, INCLUDEPATH, FORMS, RESOURCES, DEFINES
Inclusion mechanisminclude(path/file.pri) directive inside a parent .pro file
Path reference syntax$$PWD expands to the directory containing the current .pri file
Variable operator syntaxSupports =, +=, -=, *=, ~= assignment operators
Build systemqmake (bundled with Qt)
Developer / maintainerThe Qt Company (formerly Trolltech → Nokia → Digia)
Supported platformsWindows, macOS, Linux, Android, iOS, embedded systems
File structurePlain-text variable-assignment script; no binary sections or file header
Relation to .pro filesA .pri is a fragment; one .pro can include multiple .pri files
Typical use caseSharing source lists, include paths, or feature flags across multiple subprojects
EditabilityReadable and editable in any text editor or Qt Creator
Status in Qt 6Deprecated in favour of CMake; qmake and .pri files still supported for legacy projects
ReleasedEarly 2000s (qmake build system, part of Qt)
Latest versionMaintained alongside qmake in Qt 5.x / Qt 6.x (qmake being phased out in favour of CMake in Qt 6)
Open standardYes · royalty-free
Specificationdoc.qt.io

PRI conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with PRI files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about PRI files.

Frequently asked questions

What is a .pri file?
It is a Qt Project Include file - a text fragment for the qmake build system holding build settings (sources, headers, include paths) that a parent .pro project pulls in with include().
How do I open a .pri file?
Open it in any text editor (Notepad++, VS Code) to read it, or open the project's .pro file in Qt Creator to edit it with proper context and highlighting.
What's the difference between .pri and .pro?
Both are qmake files in the same language. A .pro is the main project file; a .pri is a reusable fragment meant to be included by a .pro (or another .pri) via include().
Isn't .pri a picture/image file?
Not this one. The database's 'Prisms picture image' label was an error - the software and description identify it as the Qt Project Include file. A different unrelated .pri (resources.pri) is a compiled Windows app resource index.
Can I delete .pri files from a Qt project?
No - they are part of the build configuration. Deleting one removes the build settings it contains and the parent .pro's include() line will then fail.

References

1Qt Documentation - qmake Project Filesdoc.qt.io
2Qt Documentation - include() functiondoc.qt.io

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.EXEWindows Executable (Portable Executable)
6.RPMSGRestricted Permission Message
7.MDMarkdown Document
8.DATProgram Data File (generic)
9.NOMEDIAAndroid No-Media Marker File
10.TXTPlain Text File

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z