裁剪定製Qt庫

來源:互聯網
上載者:User
Qt特徵定義檔案(裁剪定製Qt庫)

 
 
Qt源碼目錄下src/tools/qfeatures.h檔案包含了
src/tools/qconfig.h
,因此修改qconfig.h,就可以編譯自己想要的
特徵
,即qt所有功能的一個子集。

需要注意的是這樣的修改只有Qt/Embedded平台能支援,因為嵌入式環境中,減小qt庫的大小很重要,並且應用配置常常是固定的。

config.h檔案定義的是需要去除的
特徵
。有些
特徵
依賴於其他的特徵,這些依賴關係在
qfeatures.h可以看到。

可選項如下:

 

Macro Disables Set automatically by
Images (QImageIO
)
QT_NO_IMAGEIO_BMP The Microsoft Bitmap image file format.  
QT_NO_IMAGEIO_PPM The Portable Pixmap image file format.  
QT_NO_IMAGEIO_XBM The X11 Bitmap image file format.  
QT_NO_IMAGEIO_XPM The X11 Pixmap image file format.  
QT_NO_IMAGEIO_PNG The Portable Network Graphics image file format.  
Animation
QT_NO_ASYNC_IO Asynchronous I/O (QAsyncIO
)
 
QT_NO_ASYNC_IMAGE_IO Asynchronous Image I/O and GIF image support (QImageDecoder
, ...)
 
QT_NO_MOVIE Animation support (QMovie
)
QT_NO_ASYNC_IO, QT_NO_ASYNC_IMAGE_IO
Fonts
QT_NO_TRUETYPE TrueType (TTF and TTC) font file format, only used by Qt/Embedded.  
QT_NO_BDF Bitmap Distribution Format (BDF) font file format, only used by Qt/Embedded.  
QT_NO_FONTDATABASE Font database.  
Internationalization
QT_NO_I18N Conversions between Unicode and 8-bit encodings.  
QT_NO_UNICODETABLES Large tables defining such things as upper and lowercase conversions for all Unicode characters.  
MIME
QT_NO_MIME Multipurpose Internet Mail Extensions, an internet standard for encoding and tagging typed data (eg. text, images, colors) (QMimeSource
)
 
QT_NO_RICHTEXT HTML-like text (QStyleSheet
, QLabel
)
QT_NO_MIME
QT_NO_DRAGANDDROP Drag-and-drop data between applications (QDragObject
)
QT_NO_MIME
QT_NO_CLIPBOARD Cut-and-paste data between applications (QClipboard
)
QT_NO_MIME
Sound
QT_NO_SOUND Playing audio files (QSound
)
 
Scipting
QT_NO_PROPERTIES Scripting of Qt-based applications.  
Qt/Embedded-specific
QT_NO_QWS_CURSOR The cursor sprite on Qt/Embedded. Pen-operated devices would not normally need this feature.  
QT_NO_QWS_DEPTH_8GRAYSCALE 8 bits per pixel: 256 levels of gray. Incompatible with QWS_DEPTH_8.  
QT_NO_QWS_DEPTH_8 8 bits per pixel: 216-color cube with 40 auxiliary colors. Incompatible with QWS_DEPTH_8GRAYSCALE.  
QT_NO_QWS_DEPTH_15 15 bits per pixel: 32 levels for each of red, green and blue.  
QT_NO_QWS_DEPTH_16 16 bits per pixel: 64 levels of green, 32 levels for red and for blue.  
QT_NO_QWS_DEPTH_32 32 bits per pixel: 256 levels for each of red, green and blue.  
QT_NO_QWS_MACH64 Mach64 accelerated driver (demonstration only).  
QT_NO_QWS_VFB Virtual framebuffer running on X11 (see reference documentation).  
Networking
QT_NO_NETWORKPROTOCOL Abstract multi-protocol data retrieval, with local file retrieval included (QNetworkProtocol
)
 
QT_NO_NETWORKPROTOCOL_FTP FTP-protocol data retrieval. QT_NO_NETWORKPROTOCOL
QT_NO_NETWORKPROTOCOL_HTTP HTTP-protocol data retrieval. QT_NO_NETWORKPROTOCOL
Painting/drawing
QT_NO_COLORNAMES Color names such as "red", used by some QColor
constructors and by some HTML documents (QColor
, QStyleSheet
)
 
QT_NO_TRANSFORMATIONS Used by a number of classes in Qt. With this, rotation and scaling are possible. Without it, only co-ordinate translation (QWMatrix
)
 
QT_NO_PSPRINTER PostScript printer support.  
QT_NO_PRINTER Printer support (QPrinter
)
QT_NO_PSPRINTER (Unix only)
QT_NO_PICTURE Save Qt drawing commands to a files (QPicture
)
 
Widgets
QT_NO_WIDGETS Disabling this disables all widgets except QWidget
.
 
QT_NO_TEXTVIEW HTML document viewing (QTextView
)
QT_NO_WIDGETS, QT_NO_RICHTEXT
QT_NO_TEXTBROWSER HTML document browsing (QTextBrowser
)
QT_NO_TEXTVIEW
QT_NO_ICONVIEW Labelled icons (QIconView
)
QT_NO_WIDGETS, QT_NO_DRAGANDDROP
QT_NO_LISTVIEW Lists of information (QListView
)
QT_NO_WIDGETS
QT_NO_CANVAS Object canvas (QCanvas
)
QT_NO_WIDGETS
QT_NO_DIAL Value control (QDial
)
QT_NO_WIDGETS
QT_NO_WORKSPACE Multi-document interface (QWorkspace
)
QT_NO_WIDGETS
QT_NO_LCDNUMBER LCD-like number display (QLCDNumber
)
QT_NO_WIDGETS
GUI Styles
QT_NO_STYLE_WINDOWS Microsoft Windows style (QWindowsStyle
)
QT_NO_WIDGETS
QT_NO_STYLE_MOTIF OSF Motif style (QMotifStyle
)
QT_NO_WIDGETS
QT_NO_STYLE_CDE Open Group CDE style (QCDEStyle
)
QT_NO_STYLE_MOTIF
QT_NO_STYLE_AQUA MacOS X style (QAquaStyle)
QT_NO_STYLE_PLATINUM MacOS 9 style (QPlatinumStyle
)
QT_NO_WIDGETS
QT_NO_STYLE_SGI SGI style (QSGIStyle
)
QT_NO_STYLE_MOTIF
Dialogs
QT_NO_DIALOGS Disabling this disables all common dialogs QWidget
.
QT_NO_WIDGETS
QT_NO_FILEDIALOG The file selection dialog (QFileDialog
)
QT_NO_DIALOGS, QT_NO_NETWORKPROTOCOL, QT_NO_LISTVIEW
QT_NO_FONTDIALOG The font selection dialog (QFontDialog
)
QT_NO_DIALOGS, QT_NO_FONTDATABASE
QT_NO_COLORDIALOG The color selection dialog (QColorDialog
)
QT_NO_DIALOGS
QT_NO_INPUTDIALOG Text input dialog (QInputDialog
)
QT_NO_DIALOGS
QT_NO_MESSAGEBOX Message/prompting dialog (QMessageBox
)
QT_NO_DIALOGS
QT_NO_PROGRESSDIALOG Long-computation progress dialog (QProgressDialog
)
QT_NO_DIALOGS
QT_NO_TABDIALOG Tabbed-pages dialog (QTabDialog
)
QT_NO_DIALOGS
QT_NO_WIZARD Multi-step dialog (QWizard
)
QT_NO_DIALOGS

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.