Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_corelib_mimetype_qmimedatabase.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4using namespace Qt::StringLiterals;
5
9if (mime.inherits("text/plain")) {
10 // The file is plain text, we can display it in a QTextEdit
11}
13
18
20<?xml version="1.0" encoding="UTF-8"?>
21<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
22 <mime-type type="application/vnd.qt.qmakeprofile">
23 <comment xml:lang="en">Qt qmake Profile</comment>
24 <glob pattern="*.pro" weight="50"/>
25 </mime-type>
26</mime-info>
\inmodule QtCore
QMimeType mimeTypeForFile(const QString &fileName, MatchMode mode=MatchDefault) const
Returns a MIME type for the file named fileName using mode.
\inmodule QtCore
Definition qmimetype.h:25
Q_INVOKABLE bool inherits(const QString &mimeTypeName) const
Returns true if this mimetype is mimeTypeName, or inherits mimeTypeName (see parentMimeTypes()),...
static QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options=LocateFile)
[0]
Definition qcompare.h:63
GLuint GLuint GLfloat weight
GLenum type
GLubyte * pattern
QMimeDatabase db
[0]
QXmlStreamReader xml
[0]
QHostInfo info
[0]