[QMainWindow implements file drag and drop function]

QMainWindow implements file drag and drop function 1. Summary 2. Overall architecture process 3. Complete code 1. Summary QMainWindow is a class in the Qt framework that provides an application’s main application window. This window usually contains menu bar, toolbar, status bar, etc. Implementing the file drag-and-drop function, that is, dragging and dropping files into […]

Qt-QMainWindow

Table of Contents 1. QMainWindow overview: 2. Menu bar: (1) Create menu bar (2) Create menu items and put them in the menu bar (3) Create menu items and add them to the menu 2. Toolbar: (1) Create toolbar (2) Create tool menu items and add them to the toolbar (3) Control the position of […]

QMainwindow window

QMainwindow window Menu Bar How to input Chinese in the secondary menu Add corresponding actions to the menu bar Use the API methods of the QMenu class to add menu items Separator is also QAction class toolbar add toolbar Add controls to the status bar Toolbars add other types of tools Properties of the toolbar […]

Other components added in QMainwindow cannot send messages to call slot functions

Other components added in QMainwindow cannot send messages to call slot functions problem lies in Solution What is the problem #include “mainwindow.h” #include “ui_mainwindow.h” #include “QDebug” #include “QMessageBox” #include “QLineEdit” MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) {<!– –> ui->setupUi(this); QAction* a1; QAction* a2; QAction* a3; QAction* a4; a1 = ui->menu->addAction(“Open old project”); //Add a […]

QMainWindow, QDockWidget

QDockWidget 1. Description A QDockWidget can be docked inside a QMainWindow or float as a top-level window on the desktop. 2. Type members 1. enum QDockWidget::DockWidgetFeature DockWidgetClosable: Can be closed. On some systems, dock widgets always have a close button when floating. DockWidgetMovable: Can be moved between docking areas by the user. DockWidgetFloatable: It can […]

Python uses Pyside2 and Qt Designer to implement interface data query mainwindow-tablewidget and EXCEL export functions, and generate EXE executable files to directly call .ui files and generate py calls – beginners

Python uses Pyside2 and Qt Designer to implement interface data query and generate EXE executable files (directly calling .ui files and generating py calls) Call the UI file of QT Designer through the Pyside2 library, directly call the .ui file and convert the .ui file to a .pt file for calling, and call the test […]

Qt interface programming (four) – QMainWindow (a menu bar, multiple toolbars, multiple docking components, a status bar, a central component), resource files

Directory 1. Menu bar 2. Toolbar 3. Status bar 4. Docking parts (also known as riveted parts, floating windows) 5. Core Components (Central Components) 6. Create a window using the UI file 6.1 UI design window introduction 6.2 Menu bar 6.2.1 Add/Remove menu bar 6.2.2 Add menu 6.2.3 Adding menu items 6.2.4 Add multi-level menu […]