TAILIEUCHUNG - KDE 2/Qt Programming Bible phần 7

Bạn có thể tải một hình ảnh từ một tập tin, thay vì biên dịch nó như là một phần của chương trình, bằng cách làm cho một thay đổi nhỏ ví dụ trước. Tất cả những gì cần thiết là một phương pháp khác nhau để tạo ra các pixmap. Chương trình tải và hiển thị biểu tượng pixmap trước đây thể hiện trong hình 9-1 sau đây: | Chapter 18 The Widgets of Qt 427 Enums enum Direction Horizontal Vertical Cross- There are a number of examples of QGrid in Chapter 3. Reference QGroupBox This widget is capable of containing other widgets and providing them with a border and a title. File include Base Classes QFrame QObject QPaintDevice QWidget Qt Inherited By QButtonGroup QHButtonGroup QHGroupBox QVButtonGroup QVGroupBox Constructors QGroupBox QWidget parent 0 const char name 0 QGroupBox const QString title QWidget parent 0 const char name 0 QGroupBox int columns Orientation o QWidget parent 0 const char name 0 QGroupBox int columns Orientation o const QString title QWidget parent 0 const char name 0 Methods void addSpace int int alignment const int columns const Orientation orientation const virtual void setAlignment int virtual void setColumnLayout int columns Orientation o void setColumns int void setOrientation Orientation virtual void setTitle const QString QString title const The following example uses a QGroupBox widget for its top level window. It has no contents but it is given a title string as shown in Figure 18-3. include include int main int argc char argv 428 Part III Reference and Mechanics QApplication app argc argv QGroupBox groupbox new QGroupBox groupbox- setTitle Group Title groupbox- show groupbox return Figure 18-3 A QGroupBox as a top-level widget QHBox The QHBox widget is a simple container that organizes widgets side by side. File include Base Classes QFrame QObject QPaintDevice QWidget Qt Inherited By KCharSelect KURLRequester QVBox Constructors QHBox QWidget parent 0 const char name 0 WFlags f 0 bool allowLines TRUE Methods void setSpacing int bool setStretchFactor QWidget int stretch QSize sizeHint const The following example uses a QHBox as the top-level widget. It has four QLabel widgets as its child widgets. As shown in Figure 18-4 each label is displayed side by side with a .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.