Qt特征定义文件(裁剪定制Qt库)

    技术2026-04-16  0

    Qt特征定义文件(裁剪定制Qt库)    Qt源码目录下 src/tools/qfeatures.h文件包含了  src/tools/qconfig.h ,因此修改 qconfig.h,就可以编译自己想要的  特征  ,即qt所有功能的一个子集。

    需要注意的是这样的修改只有Qt/Embedded平台能支持,因为嵌入式环境中,减小qt库的大小很重要,并且应用配置常常是固定的。

    config.h文件定义的是需要去除的 特征 。有些 特征 依赖于其他的特征,这些依赖关系在 qfeatures.h可以看到。

    可选项如下:

    MacroDisablesSet automatically byImages (QImageIO )QT_NO_IMAGEIO_BMPThe Microsoft Bitmap image file format. QT_NO_IMAGEIO_PPMThe Portable Pixmap image file format. QT_NO_IMAGEIO_XBMThe X11 Bitmap image file format. QT_NO_IMAGEIO_XPMThe X11 Pixmap image file format. QT_NO_IMAGEIO_PNGThe Portable Network Graphics image file format. AnimationQT_NO_ASYNC_IOAsynchronous I/O (QAsyncIO ) QT_NO_ASYNC_IMAGE_IOAsynchronous Image I/O and GIF image support (QImageDecoder , ...) QT_NO_MOVIEAnimation support (QMovie )QT_NO_ASYNC_IO, QT_NO_ASYNC_IMAGE_IOFontsQT_NO_TRUETYPETrueType (TTF and TTC) font file format, only used by Qt/Embedded. QT_NO_BDFBitmap Distribution Format (BDF) font file format, only used by Qt/Embedded. QT_NO_FONTDATABASEFont database. InternationalizationQT_NO_I18NConversions between Unicode and 8-bit encodings. QT_NO_UNICODETABLESLarge tables defining such things as upper and lowercase conversions for all Unicode characters. MIMEQT_NO_MIMEMultipurpose Internet Mail Extensions, an internet standard for encoding and tagging typed data (eg. text, images, colors) (QMimeSource ) QT_NO_RICHTEXTHTML-like text (QStyleSheet , QLabel )QT_NO_MIMEQT_NO_DRAGANDDROPDrag-and-drop data between applications (QDragObject )QT_NO_MIMEQT_NO_CLIPBOARDCut-and-paste data between applications (QClipboard )QT_NO_MIMESoundQT_NO_SOUNDPlaying audio files (QSound ) SciptingQT_NO_PROPERTIESScripting of Qt-based applications. Qt/Embedded-specificQT_NO_QWS_CURSORThe cursor sprite on Qt/Embedded. Pen-operated devices would not normally need this feature. QT_NO_QWS_DEPTH_8GRAYSCALE8 bits per pixel: 256 levels of gray. Incompatible with QWS_DEPTH_8. QT_NO_QWS_DEPTH_88 bits per pixel: 216-color cube with 40 auxiliary colors. Incompatible with QWS_DEPTH_8GRAYSCALE. QT_NO_QWS_DEPTH_1515 bits per pixel: 32 levels for each of red, green and blue. QT_NO_QWS_DEPTH_1616 bits per pixel: 64 levels of green, 32 levels for red and for blue. QT_NO_QWS_DEPTH_3232 bits per pixel: 256 levels for each of red, green and blue. QT_NO_QWS_MACH64Mach64 accelerated driver (demonstration only). QT_NO_QWS_VFBVirtual framebuffer running on X11 (see reference documentation). NetworkingQT_NO_NETWORKPROTOCOLAbstract multi-protocol data retrieval, with local file retrieval included (QNetworkProtocol ) QT_NO_NETWORKPROTOCOL_FTPFTP-protocol data retrieval.QT_NO_NETWORKPROTOCOLQT_NO_NETWORKPROTOCOL_HTTPHTTP-protocol data retrieval.QT_NO_NETWORKPROTOCOLPainting/drawingQT_NO_COLORNAMESColor names such as "red", used by some QColor constructors and by some HTML documents (QColor , QStyleSheet ) QT_NO_TRANSFORMATIONSUsed by a number of classes in Qt. With this, rotation and scaling are possible. Without it, only co-ordinate translation (QWMatrix ) QT_NO_PSPRINTERPostScript printer support. QT_NO_PRINTERPrinter support (QPrinter )QT_NO_PSPRINTER (Unix only)QT_NO_PICTURESave Qt drawing commands to a files (QPicture ) WidgetsQT_NO_WIDGETSDisabling this disables all widgets except QWidget . QT_NO_TEXTVIEWHTML document viewing (QTextView )QT_NO_WIDGETS, QT_NO_RICHTEXTQT_NO_TEXTBROWSERHTML document browsing (QTextBrowser )QT_NO_TEXTVIEWQT_NO_ICONVIEWLabelled icons (QIconView )QT_NO_WIDGETS, QT_NO_DRAGANDDROPQT_NO_LISTVIEWLists of information (QListView )QT_NO_WIDGETSQT_NO_CANVASObject canvas (QCanvas )QT_NO_WIDGETSQT_NO_DIALValue control (QDial )QT_NO_WIDGETSQT_NO_WORKSPACEMulti-document interface (QWorkspace )QT_NO_WIDGETSQT_NO_LCDNUMBERLCD-like number display (QLCDNumber )QT_NO_WIDGETSGUI StylesQT_NO_STYLE_WINDOWSMicrosoft Windows style (QWindowsStyle )QT_NO_WIDGETSQT_NO_STYLE_MOTIFOSF Motif style (QMotifStyle )QT_NO_WIDGETSQT_NO_STYLE_CDEOpen Group CDE style (QCDEStyle )QT_NO_STYLE_MOTIFQT_NO_STYLE_AQUAMacOS X style (QAquaStyle)QT_NO_STYLE_PLATINUMMacOS 9 style (QPlatinumStyle )QT_NO_WIDGETSQT_NO_STYLE_SGISGI style (QSGIStyle )QT_NO_STYLE_MOTIFDialogsQT_NO_DIALOGSDisabling this disables all common dialogs QWidget .QT_NO_WIDGETSQT_NO_FILEDIALOGThe file selection dialog (QFileDialog )QT_NO_DIALOGS, QT_NO_NETWORKPROTOCOL, QT_NO_LISTVIEWQT_NO_FONTDIALOGThe font selection dialog (QFontDialog )QT_NO_DIALOGS, QT_NO_FONTDATABASEQT_NO_COLORDIALOGThe color selection dialog (QColorDialog )QT_NO_DIALOGSQT_NO_INPUTDIALOGText input dialog (QInputDialog )QT_NO_DIALOGSQT_NO_MESSAGEBOXMessage/prompting dialog (QMessageBox )QT_NO_DIALOGSQT_NO_PROGRESSDIALOGLong-computation progress dialog (QProgressDialog )QT_NO_DIALOGSQT_NO_TABDIALOGTabbed-pages dialog (QTabDialog )QT_NO_DIALOGSQT_NO_WIZARDMulti-step dialog (QWizard )QT_NO_DIALOGS

    最新回复(0)