1. Trang chủ
  2. » Giáo án - Bài giảng

Kỹ thuật lập trình hệ cơ điện tử= programming engineering in mechatronics chapter iv graphical user interface

97 5 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI KỸ THUẬT LẬP TRÌNH HỆ CƠ ĐIỆN TỬ Programming Engineering in Mechatronics Giảng viên: TS Nguyễn Thành Hùng Đơn vị: Bộ môn Cơ điện tử, Viện Cơ khí Hà Nội, 2018 Chapter IV Graphical User Interface What is QT? QT Framework QT in Visual Studio Qt5 C++ GUI Development Chapter IV Graphical User Interface What is QT? QT Framework QT in Visual Studio Qt5 C++ GUI Development What is QT?  A software development framework  Qt framework   Qt Creator IDE   Design and debug Tools and toolchains   APIs Simulator, complier, device toolchains Qt is released on 1991 by Trolltech Nokia acquired Trolltech in 2008  Free and open source software to puclic  C+ is the primary programming language  Chapter IV Graphical User Interface What is QT? QT Framework QT in Visual Studio Qt5 C++ GUI Development QT Framework    Qt is cross-platform application and UI framework Qt provides a well defined API that can make development quick and easy Webkit  Well accepted open source web browser  Rapidly create real-time web content and services  Use HTML and Java Script integrated in native code QT Framework  3D Graphics with OpenGL and OpenGL ES  Easily incorporate 3D Graphics in your applications  Get maximum graphics performance  Multithreading support  Network connectivity  Advanced GUI development QT Framework Qt Framework – Application Classes QT Creator – Development tools 10 Qt5 C++ GUI Development  QProgressBar  Example: https://codeloop.org/how-to-create-qprogressbar-in-qt5-gui/ 83 Qt5 C++ GUI Development  QProgressBar  Example: https://codeloop.org/how-to-create-qprogressbar-in-qt5-gui/ 84 Qt5 C++ GUI Development  QProgressBar  Example: https://codeloop.org/how-to-create-qprogressbar-in-qt5-gui/ 85 Qt5 C++ GUI Development  QProgressBar  Example: https://codeloop.org/how-to-create-qprogressbar-in-qt5-gui/ 86 Qt5 C++ GUI Development  Draw Text & Line with QPainter The QPainter class performs low-level painting on widgets and other paint devices  QPainter provides highly optimized functions to most of the drawing GUI programs require  What is Qbrush?  A brush has a style, a color, a gradient and a texture  The brush style() defines the fill pattern using the Qt::BrushStyle enum  https://codeloop.org/how-to-draw-text-line-in-qt5-with-qpainter/ Brush Styles 87 Qt5 C++ GUI Development  Draw Text & Line with QPainter  What is QPen? A pen has a style(), width(), brush(), capStyle() and joinStyle()  The pen style defines the line type  The brush is used to fill strokes generated with the pen Use the QBrush class to specify fill styles  https://codeloop.org/how-to-draw-text-line-in-qt5-with-qpainter/ 88 Qt5 C++ GUI Development  Draw Text & Line with QPainter  Example: https://codeloop.org/how-to-draw-text-line-in-qt5-with-qpainter/ 89 Qt5 C++ GUI Development  Draw Text & Line with QPainter  Example: mainwindow.cpp https://codeloop.org/how-to-draw-text-line-in-qt5-with-qpainter/ 90 Qt5 C++ GUI Development  Draw Text & Line with QPainter  Example: https://codeloop.org/how-to-draw-text-line-in-qt5-with-qpainter/ 91 Qt5 C++ GUI Development  Draw Rectangle  Example mainwindow.h https://codeloop.org/qt5-qpainter-how-to-draw-rectangle/ 92 Qt5 C++ GUI Development  Draw Rectangle  Example mainwindow.cpp https://codeloop.org/qt5-qpainter-how-to-draw-rectangle/ 93 Qt5 C++ GUI Development  Draw Rectangle  Example https://codeloop.org/qt5-qpainter-how-to-draw-rectangle/ 94 Qt5 C++ GUI Development  Draw Ellipse  Example https://codeloop.org/qt5-gui-qpainter-how-to-draw-ellipse/ 95 Qt5 C++ GUI Development  Draw Ellipse  Example https://codeloop.org/qt5-gui-qpainter-how-to-draw-ellipse/ 96 Qt5 C++ GUI Development  Draw Ellipse  Example https://codeloop.org/qt5-gui-qpainter-how-to-draw-ellipse/ 97 .. .Chapter IV Graphical User Interface What is QT? QT Framework QT in Visual Studio Qt5 C++ GUI Development Chapter IV Graphical User Interface What is QT? QT Framework QT in Visual Studio... Creator to pull in the project and build and run it on the target 14 Chapter IV Graphical User Interface What is QT? QT Framework QT in Visual Studio Qt5 C++ GUI Development 15 QT in Visual Studio... Finish to create the project Select Build > Build Solution to build it, and then select Debug > Start Debugging to run it For now, the result is an empty window 20 Chapter IV Graphical User Interface

Ngày đăng: 15/02/2022, 19:02

Xem thêm:

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN