The book of qt 4 the art of building qt applications - phần 3

lớp QObject và QCoreApplication (lớp cơ sở cho QApplication) Không ai trong số các lớp này phụ thuộc vào các thành phần giao diện. Tách từ giao diện cho phép các ứng dụng Qt (chẳng hạn như các chương trình dòng lệnh) để được viết mà không thực hiện một giao diện Trong các chương trình nongraphical | Dialogs By Mouse Click I Figure Signal slot connections are created in the Designer via drag and drop. Step two consists of specifying the desired signal and slot pair for the two widgets. As soon as you release the mouse button over the target widget the Designer opens a dialog as shown in Figure On the left it shows a menu of the most frequently used signals. If the signal you are looking for is not there click the Show all signals and slots checkbox to display all possible signals of the source widget. The right selection box will show all the slots of the target widget matching the signal selected on the left. If you confirm the choice the connection is established. Figure Signals and slots of two selected widgets are connected by the developer in this dialog. A click on the connecting line followed by pressing the Dei key will remove the connection. The Tab Sequence The so-called tab sequence is important for keyboard users. This function allows the input focus to be shifted via the Tab key to the next widget that expects input. The Designer specifies the tab sequence so that initially the first widget in the dialog has the keyboard focus. The focus is moved to the next inserted GUI element when the Tab key is pressed. When designing a user interface you should 89 I 3 GUI Design Using the Qt Designer pay attention to the default tab sequence and modify it as necessary in order to make your application as user friendly as possible. Figure How the focus is passed on when pressing the Tab key is specified in the Tab Order mode To do this you switch to the Tab Order mode via Edit Edit Tab Order or the icon with the numbers 123 and an arrow in the toolbar. Now the Designer displays each widget s current position in the tab sequence in a blue box Figure . A click on the corresponding box increases the rank in the sequence by one. Shortcuts and Buddies Those who prefer keyboard control will thank you if they can jump directly .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
141    124    11    26-06-2024
18    100    2    26-06-2024
Đã 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.