Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
KCharSelect widget cho phép người dùng lựa chọn một phông chữ, và sau đó chọn một nhân vật duy nhất từ phông chữ.Sách Adweek, Brandweek được thiết kế để trình bày cuốn sách sâu sắc thú vị, cho người đọc kinh doanh nói chung | Chapter 19 The Widgets of KDE 501 File include kbuttonbox.h Base Classes QObject QPaintDevice QWidget Qt Constructors KButtonBox QWidget parent int _orientation HORIZONTAL int border 0 int _autoborder 6 Methods QPushButton addButton const QString text bool noexpand FALSE void addStretch int scale 1 void layout virtual void resizeEvent QResizeEvent virtual QSize sizeHint const Enums enum anon VERTICAL 1 HORIZONTAL 2 Cross- You can find examples of KButtonBox in Chapter 7. Reference KCharSelect The KCharSelect widget enables the user to select a font and then select a single character from the font. File include kcharselect.h Base Classes QFrame QHBox QObject QPaintDevice QVBox QWidget Qt Constructors KCharSelect QWidget parent const char name const QString font QString null const QChar chr int tableNum 0 Methods virtual QChar chr virtual void enableFontCombo bool e virtual void enableTableSpinBox bool e virtual QString font virtual bool isFontComboEnabled virtual bool isTableSpinBoxEnabled virtual void setChar const QChar chr 502 Part III Reference and Mechanics virtual void setFont const QString font virtual void setTableNum int tableNum virtual QSize sizeHint const virtual int tableNum Signals void activated const QChar c void activated void focusItemChanged void focusItemChanged const QChar c void fontChanged const QString _font void highlighted const QChar c void highlighted The following example displays the KCharSelect window shown in Figure 19-4 showcharselect.cpp include kapp.h include kcharselect.h include qstring.h int main int argc char argv KApplication app argc argv showcharselect QWidget widget new QWidget KCharSelect kcharselect new KCharSelect widget charselect kcharselect- resize kcharselect- sizeHint widget- resize kcharselect- sizeHint widget- show app.setMainWidget widget return app.exec Figure 19-4 A KCharSelect widget with both a font and character selected Chapter 19 The Widgets of KDE 503 KCharSelectTable The KCharSelectTable widget is the .