Free tools Windows power users keep installed
One-click scans. No signup required.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Yes—Qt can provide icons without you drawing every glyph, but QIcon is not a universal icon pack that is always populated. In Qt Widgets, the active QStyle supplies standard icons such as title-bar controls, message-box symbols, drives, desktops, trash and home directories. For named actions such as Undo, Open or Save, QIcon::fromTheme() searches the operating system’s icon theme and other fallback locations. Theme contents vary by platform and desktop environment, so a lookup can legitimately return an empty icon. For predictable availability, pass an application resource as a fallback; for fixed branding, ship your own resource images or a complete icon theme.
What does “built-in QIcons” mean in Qt?
There are three different meanings behind the phrase. First, Qt Widgets styles expose a finite set of standard pixmaps through QStyle::standardIcon(). Second, QIcon::fromTheme() can retrieve named icons supplied by the current desktop theme or platform icon library. Third, your application can embed image files in the Qt Resource System and construct a QIcon from them. Only the first two are supplied by the environment; resource-backed artwork belongs to your application.
As an Amazon Associate I earn from qualifying purchases.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Qt’s documentation calls fromTheme() the most convenient way to construct an icon, but convenience does not mean universal coverage. The result depends on the operating system, desktop environment, installed theme, configured fallback paths and Qt version. Treat theme icons as environment-provided assets, not as a guaranteed package bundled into every Qt installation.
Which built-in icons can Qt Widgets provide directly?
Use the active Widgets style when the icon represents a conventional control or system action and should visually match the rest of the interface. QStyle::StandardPixmap is an enumeration of standard pixmaps intended to follow an existing GUI style or guideline, and QStyle::standardIcon() returns the icon for a selected value.
Popular on Amazon
- 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
- 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
- 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
- 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
- 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.
#include <QApplication>
#include <QIcon>
#include <QStyle>
QIcon closeIcon = QApplication::style()->standardIcon(
QStyle::SP_TitleBarCloseButton);
QIcon warningIcon = QApplication::style()->standardIcon(
QStyle::SP_MessageBoxWarning);
The available standard entries cover categories such as title-bar buttons, message-box information, warning and critical symbols, directory and drive representations, desktop, trash and home-directory actions. The exact artwork is style-dependent: changing the active style can change the pixels while your code continues to request the same semantic standard pixmap.
This approach is ideal for controls that should look native. It is not a catalog of every common toolbar command. If you need an Edit Undo, Document Open or Document Save icon, use a theme lookup or supply a fallback resource.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →How does QIcon::fromTheme() find an icon?
For a named action, call QIcon::fromTheme(). Qt searches the current icon theme, then the configured fallback theme, standalone fallback search paths and, where supported, the platform’s native icon library. If no matching name is found and you did not provide a fallback, the function returns a default-constructed, empty QIcon.
QIcon openIcon = QIcon::fromTheme(
QStringLiteral("document-open"),
QIcon(":/icons/document-open.svg"));
The second argument is important in production software. It gives the application a known result when a Linux desktop has no matching theme entry, a minimal installation omits theme data, or a platform does not expose that name. You can check the result with isNull() and choose a text-only, disabled or alternate presentation when neither the theme nor the fallback exists.
QIcon icon = QIcon::fromTheme(
QStringLiteral("document-save"),
QIcon(":/icons/document-save.svg"));
if (icon.isNull()) {
// Decide how your UI should behave when no artwork is available.
}
Theme names are convention-based. A name that works on one desktop may not be installed on another, and similarly named files are not necessarily interchangeable. Use documented freedesktop-style names for common actions when you want broad theme compatibility, but still provide a fallback for a guaranteed visual result.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Can I use typed theme icons instead of string names?
Qt 6.7 added overloads that accept QIcon::ThemeIcon. The typed enumeration includes common actions such as EditUndo, DocumentOpen, DocumentSave and ApplicationExit. Typed values avoid spelling errors in string literals while retaining theme lookup behavior.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteQIcon undoIcon = QIcon::fromTheme(
QIcon::ThemeIcon::EditUndo,
QIcon(":/icons/edit-undo.svg"));
For code that must compile against older Qt releases, use the string overload:
QIcon undoIcon = QIcon::fromTheme(
QStringLiteral("edit-undo"),
QIcon(":/icons/edit-undo.svg"));
The typed overloads require Qt 6.7 or newer. The string form remains useful for older versions and for names not represented by the enumeration. In either form, the fallback parameter is what makes the result robust across machines.
What changed across platforms and Qt versions?
Platform behavior is part of the API contract. Since Qt 6.7, Qt can access native icon libraries on macOS, iOS and Windows 10 and 11. On Android, Qt can access Material Icons when MaterialIcons-Regular is available on the system or bundled with the application. Since Qt 6.9, Qt can also generate icons from named glyphs in an available icon font; that font may be installed or bundled as an application font. These facilities supplement theme lookup; they do not make every icon name available everywhere.
Always create icons after constructing a QGuiApplication (or a subclass such as QApplication). The Qt documentation lists this application object as a prerequisite for QIcon use. Creating icons before application initialization can produce invalid behavior even when the same code works later in startup.
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
How do I guarantee an icon with the Qt Resource System?
When the artwork is part of your product identity, must be pixel-consistent or cannot depend on a user’s desktop, embed it in a Qt resource file. A resource URL such as :/icons/edit-undo.svg is available regardless of the host’s installed theme.
// resources.qrc contains <file>icons/edit-undo.svg</file>
QIcon brandedIcon(QStringLiteral(":/icons/edit-undo.svg"));
Resource-backed images are not Qt’s built-in icons; they are application-owned assets. The trade-off is predictable appearance and availability in exchange for shipping the files and maintaining their visual states. A resource can also be the fallback passed to fromTheme(), which gives you native theming where available and a guaranteed local image otherwise.
For a large, consistent set of themed icons, Qt Quick Controls documents bundling a compliant icon theme. The required format follows the Freedesktop icon-theme specification, allowing the application to carry a theme that can be used on any platform. This is more work than embedding a few SVGs, but it preserves theme-style lookup across a broad icon set.
How do I use built-in icons in Qt Quick Controls?
Qt Quick Controls puts icon properties on AbstractButton and Action. You can set icon.name, icon.source, icon.width, icon.height, icon.color and icon.cache. A named theme icon takes precedence when it is found, even if icon.source is also set; the source is used when the theme lookup fails.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →import QtQuick
import QtQuick.Controls
Button {
text: qsTr("Undo")
icon.name: "edit-undo"
icon.source: "qrc:/icons/edit-undo.svg"
}
This precedence rule makes the pattern useful for portable controls: desktop themes can provide a native-looking icon, while the bundled source acts as a safety net. If exact branding is more important than theme integration, omit icon.name and use only the resource source. If you want a theme to be portable across all targets, bundle a compliant icon theme rather than assuming the target device has one installed.
Also popular on Amazon
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
Which approach should you choose?
| Approach | API layer | Availability | Visual behavior | Fallback strategy | Version notes |
|---|---|---|---|---|---|
| Style standard icon | Qt Widgets | Provided by the active QStyle |
Follows the selected GUI style | Change to another standard entry or provide your own asset | Use QStyle::standardIcon() |
| Named theme icon | Qt GUI, Widgets or Quick | Depends on theme, platform and installed resources | Can look native, but varies by environment | Pass a resource fallback to fromTheme(); set icon.source in Quick |
Typed ThemeIcon overloads require Qt 6.7+ |
| Resource-backed image | Qt GUI, Widgets or Quick | Guaranteed when the resource is packaged | Consistent and application-controlled | Ship alternate sizes or states as resources | Works independently of desktop themes |
| Bundled icon theme | Qt Quick Controls (and theme-aware code) | Portable when it follows the Freedesktop format | Consistent theme set with name-based lookup | Bundle the complete theme and still handle missing names | Documented for cross-platform Quick Controls use |
Choose standardIcon() for style-aware Widgets chrome, fromTheme() for conventional system actions when theme variation is acceptable, and resources or a bundled theme when availability and visual consistency are requirements. Mixing them is normal: use a standard icon for a title-bar control, a themed name for Undo, and a resource fallback for both.
Why does QIcon::fromTheme() return an empty icon?
The lookup did not find a matching name in the current theme, fallback theme, search paths or native library, and no fallback icon was supplied. This commonly appears on a minimal operating-system installation, in a desktop environment with a different naming convention, or when code requests a name that the installed theme does not include.
- Check the name. Use the conventional action name or the Qt 6.7 typed value where available.
- Pass a fallback. Construct a
QIconfrom a resource URL as the second argument. - Test the result. Call
isNull()and decide whether to hide the icon, keep a text label, or use an alternate local asset. - Verify initialization. Ensure
QGuiApplicationexists before icon creation. - For Quick Controls, verify both properties. A valid
icon.namewins overicon.source; the source only appears when the name cannot be resolved.
Do not infer that an empty result means QIcon is broken. It is an explicit indication that the environment supplied no matching artwork and your code did not provide one.
What are the practical portability and design trade-offs?
Theme lookup reduces bundled assets and can make an application feel native, but the same action can have different shapes, colors and availability on different systems. Standard Widgets icons follow the active style even more closely, which is useful for platform conformity but means screenshots and exact layouts can change with the style.
Resources add package size and require you to maintain light, dark, disabled and high-density variants as needed, yet they are the only straightforward way to guarantee a particular visual identity. A bundled theme offers name-based organization for a large set, but it requires conforming files and directory metadata rather than copying a few unrelated images.
Also popular on Amazon
- 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
- 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
- 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
- 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
- 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
For accessibility and usability, keep a text label or accessible action name even when an icon is present. An icon lookup failure should not remove the command itself. In Quick Controls, setting both a meaningful text value and an icon source follows the same principle.
What is the safest implementation pattern?
Start with the semantic API, then add a deterministic fallback:
// Widgets example, Qt 6.7+
QIcon saveIcon = QIcon::fromTheme(
QIcon::ThemeIcon::DocumentSave,
QIcon(":/icons/document-save.svg"));
QAction *saveAction = new QAction(saveIcon, tr("Save"), this);
On older Qt versions, replace the typed value with QStringLiteral("document-save"). In a Quick Controls component, set icon.name and a qrc: icon.source. For a standard Widgets control, request the matching QStyle::StandardPixmap instead of guessing a theme name. This layered approach lets the platform provide an appropriate icon while ensuring the command remains visible when the platform cannot.
Bottom line: are there built-in QIcons?
Qt has built-in icon mechanisms, not a single universal icon library. QStyle::standardIcon() supplies style-defined standard controls; QIcon::fromTheme() supplies named actions when the environment has them; and Qt Quick Controls follows the same theme-first, source-fallback model. Use a resource-backed fallback whenever an empty icon would harm usability, and bundle your own images or a compliant theme when the appearance must be identical on every platform.
Frequently Asked Questions
Do I need to install an icon theme for every Qt application?
No. A Widgets style can still provide its standard pixmaps, and your application can embed resource images. An installed theme is only necessary for icons you expect to resolve through theme lookup without a bundled fallback.
Can I change the icon theme while a Qt application is running?
Theme resolution follows the current application and platform configuration, so an icon that was already constructed is not a promise that it will update automatically. If your application responds to a theme change, recreate or refresh the relevant icons and verify their non-null state.
Recommended Free Tools
Are SVG files required for resource fallbacks?
No. QIcon can load application-embedded image files; SVG is simply a convenient scalable format for many interface icons. Choose the resource format and variants that match your rendering and packaging requirements.
Will a native platform icon always match a freedesktop theme name?
No. Native libraries and desktop themes are separate sources, and their available names differ. Code that needs a guaranteed result should provide a local resource fallback rather than relying on a native mapping.

