Qt-Advanced-Docking-System示例程序

写了一些简单的示例程序,帮助我更好地使用和了解Qt-Advanced-Docking-System

1.写一个如图页面布局的程序

 

    m_pDockManger=new ads::CDockManager(this);
    this->setCentralWidget(m_pDockManger);

    ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");
    m_pDockManger->setCentralWidget(centerDockWidget);
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);

    ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");
    m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);

    ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");
    m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());

    ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");
    m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget4=new ads::CDockWidget("页面4");
    m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget4,centerDockWidget->dockAreaWidget());

2.在centerDockWidget->dockAreaWidget()的ads::BottomDockWidgetArea添加widget

    m_pDockManger=new ads::CDockManager(this);
    this->setCentralWidget(m_pDockManger);

    ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");
    m_pDockManger->setCentralWidget(centerDockWidget);
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);

    ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");
    m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);


    ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");
    m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());

    ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");
    m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget4=new ads::CDockWidget("页面4");
    m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget4,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget5=new ads::CDockWidget("页面5");
    m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget5,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget6=new ads::CDockWidget("页面6");
    m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget6,centerDockWidget->dockAreaWidget());

3.写一个如图所示的程序

    m_pDockManger=new ads::CDockManager(this);
    this->setCentralWidget(m_pDockManger);

    ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");
    centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);
    m_pDockManger->setCentralWidget(centerDockWidget);
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);

    ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");
    m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);

    ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");
    m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());

    ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");
    m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());

4.

    m_pDockManger=new ads::CDockManager(this);
    this->setCentralWidget(m_pDockManger);

    ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");
    centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);
    m_pDockManger->setCentralWidget(centerDockWidget);
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);

    ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");
    m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);


    ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");
    m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());

    ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");
    m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget4=new ads::CDockWidget("页面4");
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget4,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget5=new ads::CDockWidget("页面5");
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget5,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget6=new ads::CDockWidget("页面6");
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget6,centerDockWidget->dockAreaWidget());

5.

    m_pDockManger=new ads::CDockManager(this);
    this->setCentralWidget(m_pDockManger);

    ads::CDockWidget* centerDockWidget=new ads::CDockWidget("中心页面");
    centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);
    m_pDockManger->setCentralWidget(centerDockWidget);
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);

    ads::CDockWidget* pDockWidget1=new ads::CDockWidget("页面1");
    m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);


    ads::CDockWidget* pDockWidget2=new ads::CDockWidget("页面2");
    m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());

    ads::CDockWidget* pDockWidget3=new ads::CDockWidget("页面3");
    m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget4=new ads::CDockWidget("页面4");
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget4,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget5=new ads::CDockWidget("页面5");
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget5,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget6=new ads::CDockWidget("页面6");
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget6,centerDockWidget->dockAreaWidget());


    ads::CDockWidget* pDockWidget7=new ads::CDockWidget("页面7");
    m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,pDockWidget7,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* pDockWidget8=new ads::CDockWidget("页面8");
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget8,pDockWidget7->dockAreaWidget());

    ads::CDockWidget* pDockWidget9=new ads::CDockWidget("页面9");
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,pDockWidget9,pDockWidget7->dockAreaWidget());

6.

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QListWidget>
#include <QLabel>
#include "DockManager.h"
#include "QtDock/DockAreaWidget.h"
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_actionAdd_triggered();

private:
    Ui::MainWindow *ui;
    ads::CDockManager* m_pDockManger;

    ads::CDockWidget* centerDockWidget;
    ads::CDockWidget* bottomDockWidget;

    QListWidget* ListWidget;

    int mProjectNum=0;
};

#endif // MAINWINDOW_H
#include "mainwindow.h"
#include "ui_mainwindow.h"


MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    m_pDockManger=new ads::CDockManager(this);
    this->setCentralWidget(m_pDockManger);

    centerDockWidget=new ads::CDockWidget("中心页面");
    centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);
    m_pDockManger->setCentralWidget(centerDockWidget);
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);

    ads::CDockWidget* pDockWidget1=new ads::CDockWidget("测试页面1");
    m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);

    ads::CDockWidget* pDockWidget2=new ads::CDockWidget("项目管理");
    m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());
    ListWidget=new QListWidget(pDockWidget2);
    pDockWidget2->setWidget(ListWidget);


    ads::CDockWidget* pDockWidget3=new ads::CDockWidget("测试页面2");
    m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());

    bottomDockWidget=new ads::CDockWidget("底部页面");
    bottomDockWidget->setFeature(ads::CDockWidget::NoTab,true);
    m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,bottomDockWidget,centerDockWidget->dockAreaWidget());
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_actionAdd_triggered()
{
    mProjectNum++;
    ListWidget->addItem(QString("项目%1").arg(mProjectNum));

    ads::CDockWidget* cDockWidget=new ads::CDockWidget(QString("中心页面%1").arg(mProjectNum));
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,cDockWidget,centerDockWidget->dockAreaWidget());

    ads::CDockWidget* bDockWidget=new ads::CDockWidget(QString("底部页面%1").arg(mProjectNum));
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,bDockWidget,bottomDockWidget->dockAreaWidget());
}

7.dockWidgetsMap()

        QMap<QString, ads::CDockWidget*> map=m_pDockManger->dockWidgetsMap();
        qDebug()<<map.keys();
        for(auto key:map.keys())
        {
            qDebug()<<key.toStdString().c_str();
        }

中心页面

中心页面1

中心页面2

中心页面3

中心页面4

底部页面

底部页面1

底部页面2

底部页面3

底部页面4

测试页面1

测试页面2

项目管理

qDebug()<<"centralWidget():"<<m_pDockManger->centralWidget()->objectName().toStdString().c_str();

centralWidget(): 中心页面

8. 


        QMap<QString, ads::CDockWidget*> map=m_pDockManger->dockWidgetsMap();
        for(auto key:map.keys())
        {
            qDebug()<<key.toStdString().c_str();
            auto value = map[key];
            qDebug()<<"ads::CDockWidget:"<<value;
            qDebug()<<"dockAreaWidget:"<<value->dockAreaWidget();
        }

中心页面

ads::CDockWidget: ads::CDockWidget(0x3052108, name = "\u4E2D\u5FC3\u9875\u9762")

dockAreaWidget: ads::CDockAreaWidget(0x30818f0)

中心页面1

ads::CDockWidget: ads::CDockWidget(0x41f25a8, name = "\u4E2D\u5FC3\u9875\u97621")

dockAreaWidget: ads::CDockAreaWidget(0x30818f0)

底部页面

ads::CDockWidget: ads::CDockWidget(0x30f8f68, name = "\u5E95\u90E8\u9875\u9762")

dockAreaWidget: ads::CDockAreaWidget(0x30f90a8)

底部页面1

ads::CDockWidget: ads::CDockWidget(0x41f26c0, name = "\u5E95\u90E8\u9875\u97621")

dockAreaWidget: ads::CDockAreaWidget(0x30f90a8)

测试页面1

ads::CDockWidget: ads::CDockWidget(0x3092060, name = "\u6D4B\u8BD5\u9875\u97621")

dockAreaWidget: ads::CDockAreaWidget(0x3091ea8)

测试页面2

ads::CDockWidget: ads::CDockWidget(0x30eca80, name = "\u6D4B\u8BD5\u9875\u97622")

dockAreaWidget: ads::CDockAreaWidget(0x30ecad0)

项目管理

ads::CDockWidget: ads::CDockWidget(0x30d81b0, name = "\u9879\u76EE\u7BA1\u7406")

dockAreaWidget: ads::CDockAreaWidget(0x30d84a8)

9.

        QList<ads::CDockAreaWidget*> areas=m_pDockManger->openedDockAreas();
        qDebug()<<areas;

 (ads::CDockAreaWidget(0x3071828), ads::CDockAreaWidget(0x3082448), ads::CDockAreaWidget(0x30c81b0), ads::CDockAreaWidget(0x30dd250), ads::CDockAreaWidget(0x30e8fb8))

对应5块区域 

 

10.

        QMap<QString, ads::CDockWidget*> map=m_pDockManger->dockWidgetsMap();
        for(auto key:map.keys())
        {
            qDebug()<<key.toStdString().c_str();
            auto value = map[key];
            qDebug()<<"ads::CDockWidget:"<<value;
            qDebug()<<"dockAreaWidget:"<<value->dockAreaWidget();
        }

area: ads::CDockAreaWidget(0x31118a0) count: 5

area: ads::CDockAreaWidget(0x3122128) count: 1

area: ads::CDockAreaWidget(0x3168458) count: 1

area: ads::CDockAreaWidget(0x317c440) count: 1

area: ads::CDockAreaWidget(0x3189440) count: 5

相关函数:

QList<CDockWidget*> CDockAreaWidget::dockWidgets() const

 这个信号也比较好用

ads::CDockAreaWidget::currentChanged

11.

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QListWidget>
#include <QLabel>
#include "DockManager.h"
#include "QtDock/DockAreaWidget.h"
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_actionAdd_triggered();

private:
    Ui::MainWindow *ui;
    ads::CDockManager* m_pDockManger;

    ads::CDockWidget* centerDockWidget;
    QHash<int,ads::CDockWidget*> centerHash;
    QHash<int,ads::CDockWidget*> bottomHash;
    ads::CDockWidget* bottomDockWidget;

    QListWidget* ListWidget;

    int mProjectNum=0;

    QLabel * mLabelOne;
    QLabel * mLabelTwo;
};

#endif // MAINWINDOW_H
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    m_pDockManger=new ads::CDockManager(this);
    this->setCentralWidget(m_pDockManger);

    centerDockWidget=new ads::CDockWidget("中心页面");
    centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);

    m_pDockManger->setCentralWidget(centerDockWidget);
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);

    ads::CDockWidget* pDockWidget1=new ads::CDockWidget("测试页面1");
    m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);
    mLabelOne=new QLabel(pDockWidget1);
    pDockWidget1->setWidget(mLabelOne);

    ads::CDockWidget* pDockWidget2=new ads::CDockWidget("项目管理");
    m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());
    ListWidget=new QListWidget(pDockWidget2);
    connect(ListWidget,&QListWidget::currentItemChanged,this,[=](QListWidgetItem *current, QListWidgetItem *previous){
        int index=current->data(Qt::UserRole).toInt();
        ads::CDockAreaWidget* centerArea=centerDockWidget->dockAreaWidget();
        centerArea->setCurrentDockWidget(centerHash[index]);

        ads::CDockAreaWidget* bottomArea=bottomDockWidget->dockAreaWidget();
        bottomArea->setCurrentDockWidget(bottomHash[index]);

        QString msg=QString("当时是项目%1").arg(index);
        mLabelOne->setText(msg);
        mLabelTwo->setText(msg);
    });
    pDockWidget2->setWidget(ListWidget);


    ads::CDockWidget* pDockWidget3=new ads::CDockWidget("测试页面2");
    m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());
    mLabelTwo=new QLabel(pDockWidget3);
    pDockWidget3->setWidget(mLabelTwo);

    bottomDockWidget=new ads::CDockWidget("底部页面");
    bottomDockWidget->setFeature(ads::CDockWidget::NoTab,true);
    m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,bottomDockWidget,centerDockWidget->dockAreaWidget());
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_actionAdd_triggered()
{
    mProjectNum++;
    QListWidgetItem *item;
    item=new QListWidgetItem(ListWidget);
    item->setText(QString("项目%1").arg(mProjectNum));
    item->setData(Qt::UserRole,mProjectNum);
    ListWidget->addItem(item);
    ListWidget->setCurrentItem(item);

    ads::CDockWidget* cDockWidget=new ads::CDockWidget(QString("中心页面%1").arg(mProjectNum));
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,cDockWidget,centerDockWidget->dockAreaWidget());
    centerHash.insert(mProjectNum,cDockWidget);

    ads::CDockWidget* bDockWidget=new ads::CDockWidget(QString("底部页面%1").arg(mProjectNum));
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,bDockWidget,bottomDockWidget->dockAreaWidget());
    bottomHash.insert(mProjectNum,bDockWidget);

    QString msg=QString("当时是项目%1").arg(mProjectNum);
    mLabelOne->setText(msg);
    mLabelTwo->setText(msg);
}

12.

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QListWidget>
#include <QLabel>
#include "DockManager.h"
#include "QtDock/DockAreaWidget.h"
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_actionAdd_triggered();

    void onProjectChanged(int index);
private:
    Ui::MainWindow *ui;
    ads::CDockManager* m_pDockManger;

    ads::CDockWidget* centerDockWidget;
    ads::CDockWidget* bottomDockWidget;
    QListWidget* ListWidget;
    QHash<int,ads::CDockWidget*> centerHash;
    QHash<int,ads::CDockWidget*> bottomHash;
    QHash<int,QListWidgetItem*>  itemHash;

    int mProjectNum=0;

    QLabel * mLabelOne;
    QLabel * mLabelTwo;
};

#endif // MAINWINDOW_H
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    m_pDockManger=new ads::CDockManager(this);
    qDebug()<<"m_pDockManger:"<<m_pDockManger;
    this->setCentralWidget(m_pDockManger);

    centerDockWidget=new ads::CDockWidget("中心页面");
    centerDockWidget->setFeature(ads::CDockWidget::NoTab,true);
    m_pDockManger->setCentralWidget(centerDockWidget);
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,centerDockWidget);
    ads::CDockAreaWidget* centerArea=centerDockWidget->dockAreaWidget();
    connect(centerArea,&ads::CDockAreaWidget::currentChanged,this,&MainWindow::onProjectChanged);

    bottomDockWidget=new ads::CDockWidget("底部页面");
    bottomDockWidget->setFeature(ads::CDockWidget::NoTab,true);
    m_pDockManger->addDockWidget(ads::BottomDockWidgetArea,bottomDockWidget,centerDockWidget->dockAreaWidget());
    ads::CDockAreaWidget* bottomArea=bottomDockWidget->dockAreaWidget();
    connect(bottomArea,&ads::CDockAreaWidget::currentChanged,this,&MainWindow::onProjectChanged);


    ads::CDockWidget* pDockWidget1=new ads::CDockWidget("测试页面1");
    m_pDockManger->addDockWidget(ads::LeftDockWidgetArea,pDockWidget1);
    mLabelOne=new QLabel(pDockWidget1);
    pDockWidget1->setWidget(mLabelOne);

    ads::CDockWidget* pDockWidget2=new ads::CDockWidget("项目管理");
    m_pDockManger->addDockWidget(ads::TopDockWidgetArea,pDockWidget2,pDockWidget1->dockAreaWidget());
    ListWidget=new QListWidget(pDockWidget2);
    pDockWidget2->setWidget(ListWidget);
    connect(ListWidget,&QListWidget::currentItemChanged,this,[=](QListWidgetItem *current, QListWidgetItem *previous){
        int index=current->data(Qt::UserRole).toInt();
        onProjectChanged(index);
    });


    ads::CDockWidget* pDockWidget3=new ads::CDockWidget("测试页面2");
    m_pDockManger->addDockWidget(ads::RightDockWidgetArea,pDockWidget3,centerDockWidget->dockAreaWidget());
    mLabelTwo=new QLabel(pDockWidget3);
    pDockWidget3->setWidget(mLabelTwo);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_actionAdd_triggered()
{
    mProjectNum++;
    QListWidgetItem *item;
    item=new QListWidgetItem(ListWidget);
    item->setText(QString("项目%1").arg(mProjectNum));
    item->setData(Qt::UserRole,mProjectNum);
    ListWidget->addItem(item);

    itemHash.insert(mProjectNum,item);
    ListWidget->setCurrentItem(item);

    ads::CDockWidget* cDockWidget=new ads::CDockWidget(QString("中心页面%1").arg(mProjectNum));
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,cDockWidget,centerDockWidget->dockAreaWidget());
    centerHash.insert(mProjectNum,cDockWidget);

    ads::CDockWidget* bDockWidget=new ads::CDockWidget(QString("底部页面%1").arg(mProjectNum));
    m_pDockManger->addDockWidget(ads::CenterDockWidgetArea,bDockWidget,bottomDockWidget->dockAreaWidget());
    bottomHash.insert(mProjectNum,bDockWidget);

    QString msg=QString("当时是项目%1").arg(mProjectNum);
    mLabelOne->setText(msg);
    mLabelTwo->setText(msg);
}

void MainWindow::onProjectChanged(int index)
{
    ListWidget->setCurrentItem(itemHash[index]);

    ads::CDockAreaWidget* centerArea=centerDockWidget->dockAreaWidget();
    centerArea->setCurrentDockWidget(centerHash[index]);

    ads::CDockAreaWidget* bottomArea=bottomDockWidget->dockAreaWidget();
    bottomArea->setCurrentDockWidget(bottomHash[index]);

    QString msg=QString("当时是项目%1").arg(index);
    mLabelOne->setText(msg);
    mLabelTwo->setText(msg);
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/742808.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

麦克风哪个品牌音质最好,领夹麦克风十大品牌排行榜

​随着科技的不断进步&#xff0c;无线领夹麦克风在各类场合都展现出强大实力。无论是直播、采访还是教学&#xff0c;无线领夹麦克风都成为媒体人创作的重要工具。对于追求作品质量的媒体人来说&#xff0c;选择一款性能优异、价格合理的无线领夹麦克风至关重要。因此&#xf…

中小学校共用电脑通过安当SLA产品配置实现开机控制

中小学校公用电脑实现电脑开机控制的必要性主要体现在以下几个方面&#xff1a; 1. 增强安全性&#xff1a; 公用电脑由于使用频繁&#xff0c;容易被未经授权的用户访问&#xff0c;可能存在数据泄露或恶意软件植入的风险。通过实现电脑开机控制&#xff0c;学校可以确保只有…

如何利用自助式商业智能(BI)打破组织中的数据孤岛?

前言 许多组织都存在数据问题。当许多员工远程工作&#xff08;或在混合环境中&#xff09;并在多个位置使用多个设备访问公司数据时&#xff0c;他们正在处理信息过载问题。这只会加剧数据孤岛的问题。 数据孤岛正是它听起来的样子&#xff1a;孤立在一个孤立的用户/环境中的…

2024年无线领夹麦克风选购指南,领夹麦克风哪个品牌好

"领夹麦克风"这个名词对于大多数人可能还比较陌生&#xff0c;但在互联网专业人士和短视频制作者的世界里&#xff0c;它却是一个不可或缺的工具。如果你有志于成为短视频领域的创作者&#xff0c;或者想要参与视频拍摄、直播等多媒体内容的制作&#xff0c;那么了解…

如何选择和优化谷歌外贸关键词?

长尾关键词是关键&#xff0c;长尾关键词是指由三个或更多词组成的更具体、更详细的搜索词组。与单个关键词相比&#xff0c;长尾关键词虽然搜索量较低&#xff0c;但往往能带来更高的转化率&#xff0c;因为它们更能精准地反映用户的搜索意图和需求 使用长尾关键词有几个优势…

Go语言之控制结构

个人网站&#xff1a; http://hardyfish.top/ 免费书籍分享&#xff1a; 资料链接&#xff1a;https://url81.ctfile.com/d/57345181-61545511-81795b?p3899 访问密码&#xff1a;3899 免费专栏分享&#xff1a; 资料链接&#xff1a;https://url81.ctfile.com/d/57345181-6…

原生js实现图片预览控件,支持丝滑拖拽,滚轮放缩,放缩聚焦

手撸源代码如下&#xff1a;注释应该很详细了&#xff0c;拿去直用 可以放到在线编辑器测试&#xff0c;记得修改图片路径 菜鸟教程在线编辑器 <html lang"en"><head><meta charset"UTF-8"><meta name"viewport" conten…

5、双足机器人mpc动力学模型

为计算机器人的当前实际状态x,需要建立双足质心动力学模型。 速度模型由控制输入变量推导速度公式: x向速度νx :当前机器人x方向的前进速度,初始值由速度传感器实时测量得到。y向速度νy :机器人y方向的平移速度。z向速度νz :垂直方向的速度,对于双足机器人行走时为0:…

性能评测系列(PT-010):Spring Boot + MySQL,高并发insert

一、测试概述 测试场景 场景编号&#xff1a; PT-010场景描述&#xff1a; Java应用&#xff0c;MySQL单表写测试目的&#xff1a;指定规格、配置、环境下&#xff0c;Java应用数据库简单写场景负载能力评估。&#xff08;不含调优&#xff0c;所测结果未必是最优结果&#x…

好记性不如烂笔头(三)——文件保存后打开呈现乱码问题

现象 请随博主进行下列操作&#xff0c;神奇的事情会发生—— 1、新建记事本&#xff0c;里面输入“同”字&#xff0c;保存为ANSI格式 2、再次打开会发现&#xff0c;“同”已经变成了乱码 3、类似的字还有很多&#xff0c;例如“同学”的“学”。而有些字则不会出现这种情况…

基于卡尔曼滤波的锂蓄电池SOC设计

本文探讨了使用自适应卡尔曼滤波方法&#xff0c;基于锂离子动力电池等效电路模型&#xff0c;在未知干扰噪声环境下在线估计电动汽车锂离子动力电池荷电状态&#xff08;SOC&#xff09;的问题。 随着电动汽车的快速发展&#xff0c;电池状态的准确估计变得越来越重要。自适应…

C语言| 冒泡排序-从大到小-

【冒泡排序】最基本的排序方法&#xff0c;一定要掌握。 【冒泡排序的原理】 从左往右&#xff0c;相邻元素进行比较。 每次比较一轮&#xff0c;就会找到序列中最大的一个元素或者最小的元素。 这个数就会从序列的最右边冒出来&#xff0c;所以叫冒泡排序。 以从小到大排序为…

Studying-代码随想录训练营day19| 530.二叉搜索树的最小绝对差、501.二叉搜索树中的众数、236.二叉树的最近公共祖先

第十九天&#xff0c;二叉树part06&#xff0c;二叉树的道路任重而道远&#x1f4aa; 目录 530.二叉搜索树的最小绝对差 501.二叉搜索树中的众数 236.二叉树的最近公共祖先 总结 530.二叉搜索树的最小绝对差 文档讲解&#xff1a;代码随想录二叉搜索树的最小绝对差 视频…

一文理清OCR的前世今生

AI应用开发相关目录 本专栏包括AI应用开发相关内容分享&#xff0c;包括不限于AI算法部署实施细节、AI应用后端分析服务相关概念及开发技巧、AI应用后端应用服务相关概念及开发技巧、AI应用前端实现路径及开发技巧 适用于具备一定算法及Python使用基础的人群 AI应用开发流程概…

CCSK认证考试详解:内容、形式、费用及备考指南

CCSK认证考试&#xff0c;也称为CCSK考试&#xff0c;是关于云计算安全的专业认证&#xff0c;由国际云安全联盟&#xff08;Cloud Security Alliance, CSA&#xff09;推出。以下是关于CCSK认证考试的详细信息&#xff1a; 考试内容 CCSK考试内容涵盖了云安全的基础知识&…

Day4: 两两交换链表中的节点 24 删除链表的倒数第N个节点 19 链表相交 02.07 环形链表II 142

题目24. 两两交换链表中的节点 - 力扣&#xff08;LeetCode&#xff09; /*** Definition for singly-linked list.* struct ListNode {* int val;* ListNode *next;* ListNode() : val(0), next(nullptr) {}* ListNode(int x) : val(x), next(nullptr) {}* …

安泰电压放大器有什么作用

电压放大器是一种电子器件&#xff0c;它能够将输入信号的电压增大到所需的输出电压水平。电压放大器在电子电路设计中起到了至关重要的作用&#xff0c;下面将详细介绍电压放大器的作用。 信号放大作用&#xff1a;电压放大器主要作用是放大输入信号的电压&#xff0c;使其具有…

全域运营系统是如何做好全平台运营?

当前&#xff0c;全域运营的热度持续上涨&#xff0c;多篇分析全域运营平台优缺点的帖子也在多个创业者交流群中风靡一时。综合来看&#xff0c;在众多的全域运营平台中&#xff0c;属后面我们说的这家全域运营平台的分析最为详尽。 其中&#xff0c;对于我们的全域运营平台的优…

达梦数据库(DM8)替换授权dm.key遇到的错误, lic info is different between dm.key and sysinfo.

1、报错贴图 2、报错日志提示 version info: security lic info is different between dm.key and sysinfo. 原因说明&#xff1a;dm.key授权与服务器的硬件环境不匹配引起的报错&#xff0c;如&#xff1a;cpu、操作系统版本有关。

2023国家最高科学技术奖薛其坤院士:科学家的幸福感来自于哪里

内容来源&#xff1a;量子前哨&#xff08;ID&#xff1a;Qforepost&#xff09; 文丨浪味仙 排版丨沛贤 深度好文&#xff1a;2000字丨8分钟阅读 6 月 24 日&#xff0c;2023 年度国家最高科学技术奖在京揭晓&#xff0c;薛其坤院士荣获中国科技界崇高荣誉&#xff0c;这不…