当前位置: 首页>>代码示例>>C++>>正文


C++ QSplitter::addWidget方法代码示例

本文整理汇总了C++中QSplitter::addWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplitter::addWidget方法的具体用法?C++ QSplitter::addWidget怎么用?C++ QSplitter::addWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QSplitter的用法示例。


在下文中一共展示了QSplitter::addWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initializeDockWidgets

void GLShaderDev::initializeDockWidgets()
{
    QSplitter*  splitter = new QSplitter;
    QTabWidget* optionTab = new QTabWidget;

    _shaderStages = new ShaderStagesView;
    _shaderInput = new ShaderInputView;

    optionTab->setMovable(true);
    optionTab->addTab(_shaderInput, tr("Shader Input"));
    optionTab->addTab(_shaderStages, tr("Build Stages"));

    splitter->setOrientation(Qt::Vertical);
    splitter->addWidget(_glpreview);
    splitter->addWidget(optionTab);

    QDockWidget *dockWidget = new QDockWidget(tr("OpenGL View"), this);
    dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
    dockWidget->setWidget(splitter);
    addDockWidget(Qt::RightDockWidgetArea, dockWidget);
    //   dockWidget->setFloating(true); FIXME

    _buildOutputDock = new QDockWidget(tr("Build log"), this);
    _buildOutputDock->setAllowedAreas(Qt::BottomDockWidgetArea);
    _buildOutputDock->setFeatures(QDockWidget::DockWidgetVerticalTitleBar | _buildOutputDock->features());
    _buildOutputDock->setWidget(_output);
    addDockWidget(Qt::BottomDockWidgetArea, _buildOutputDock);
    _buildOutputDock->hide();

    connect(_output, SIGNAL(dereferencableItemActivated(const QString&, int, int)), _editor, SLOT(gotoFile(const QString&, int, int)));
}
开发者ID:Ryp,项目名称:GLShaderDev,代码行数:31,代码来源:GLShaderDev.cpp

示例2: QWidget

MatchCheckingWidget::MatchCheckingWidget(QWidget* parent, Qt::WindowFlags f)
  : QWidget(parent, f)
{
  QVBoxLayout *layout = new QVBoxLayout(this);

  m_lineEdit = new QLineEdit();

  connect(m_lineEdit, SIGNAL(textChanged(QString)), SLOT(matchChanged(QString)));


  m_dynamicTreeRadioButton = new QRadioButton("Dynamic Tree Model", this);
  m_selectionModelRadioButton = new QRadioButton("Selection Model", this);

  layout->addWidget(m_lineEdit);
  layout->addWidget(m_dynamicTreeRadioButton);
  layout->addWidget(m_selectionModelRadioButton);

  QSplitter *splitter = new QSplitter(this);
  layout->addWidget(splitter);
  DynamicTreeModel *dynamicTreeModel = new DynamicTreeModel(this);

  m_dynamicTreeWidget = new DynamicTreeWidget(dynamicTreeModel, this);

  splitter->addWidget(m_dynamicTreeWidget);

  KSelectionProxyModel *selectionProxyModel = new KSelectionProxyModel(m_dynamicTreeWidget->treeView()->selectionModel(), this);
  selectionProxyModel->setSourceModel(dynamicTreeModel);

  m_selectionTreeView = new QTreeView(this);
  m_selectionTreeView->setModel(selectionProxyModel);
  splitter->addWidget(m_selectionTreeView);
}
开发者ID:vasi,项目名称:kdelibs,代码行数:32,代码来源:matchcheckingwidget.cpp

示例3: QTreeWidget

void
FormMain::createWidgets()
{
	tree = new QTreeWidget( this );
	tree->setHeaderLabel("");
	tree->setContextMenuPolicy( Qt::CustomContextMenu );

	connect( tree, SIGNAL( customContextMenuRequested( const QPoint & ) ),
			SLOT( treeContextMenu( const QPoint & ) ) );

	editInfo = new QTextEdit( this );

	connect( tree, SIGNAL( currentItemChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ),
			SLOT( folderChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ) );

	chart = new Chart( this );

	QSplitter * splitterHor = new QSplitter( Qt::Horizontal, this );

	splitterHor->addWidget( tree );
	splitterHor->addWidget( editInfo );
	splitterHor->addWidget( chart );

	setCentralWidget( splitterHor );
}
开发者ID:masakra,项目名称:folderchart,代码行数:25,代码来源:FormMain.cpp

示例4: QGLViewer

MainWindow::MainWindow(QWidget *parent):QMainWindow(parent)
{

	setMinimumSize(20, 20);
	resize(1500, 900); 

	glViewer = new QGLViewer(this);

	m_parameter_control = new ParameterControl(glViewer, this);	

	createActions();
	createMenus();
	createToolBars();

	QList <int> sizes;
	sizes<<1200<<300;
	QSplitter* mainSplitter = new QSplitter(Qt::Horizontal);
	mainSplitter->addWidget(glViewer);
	mainSplitter->addWidget(m_parameter_control);
    mainSplitter->setSizes(sizes);
	mainSplitter->setStretchFactor(0, 1);

	setCentralWidget(mainSplitter);

	setWindowTitle("Parameter");
}
开发者ID:hywei,项目名称:MultiChart-Parameterization,代码行数:26,代码来源:MainWindow.cpp

示例5: QWidget

GraphViewer::GraphViewer(ProbeInterface *probe, QWidget *parent)
    : QWidget(parent),
      mWidget(new GraphWidget(this)),
      mProbeIface(probe)
{
    QSortFilterProxyModel *objectFilter = new KRecursiveFilterProxyModel(this);
    objectFilter->setSourceModel(probe->objectTreeModel());
    objectFilter->setDynamicSortFilter(true);

    QVBoxLayout *vbox = new QVBoxLayout;
    KFilterProxySearchLine *objectSearchLine = new KFilterProxySearchLine(this);
    objectSearchLine->setProxy(objectFilter);
    vbox->addWidget(objectSearchLine);
    QTreeView *objectTreeView = new QTreeView(this);
    objectTreeView->setModel(objectFilter);
    objectTreeView->setSortingEnabled(true);
    vbox->addWidget(objectTreeView);
    connect(objectTreeView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
            SLOT(handleRowChanged(QModelIndex)));
    mObjectTreeView = objectTreeView;

    QWidget *treeViewWidget = new QWidget(this);
    treeViewWidget->setLayout(vbox);

    QSplitter *splitter = new QSplitter(this);
    splitter->addWidget(treeViewWidget);
    splitter->addWidget(mWidget);
    QHBoxLayout *hbox = new QHBoxLayout(this);
    hbox->addWidget(splitter);

    QMetaObject::invokeMethod(this, "delayedInit", Qt::QueuedConnection);
}
开发者ID:frankosterfeld,项目名称:GammaRay,代码行数:32,代码来源:objectvisualizer.cpp

示例6: createPage

void FiPage::createPage()
{
  mTab = new QTabWidget;
  mTab->setTabPosition(QTabWidget::South);
//   connect(mTab, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));

  mTab->addTab(makeMainTab(),   tr("Main"));
  mTab->addTab(makeSplitTab(),  tr("Splits"));
  mTab->addTab(makeCoTab(),     tr("Chart Objects"));
  mTab->addTab(makeBarTab(),    tr("EODBars"));

  mPlotSheet = new IndicatorWidget("FiPage", this);

  QSplitter* splitter = new QSplitter(Qt::Vertical);
  splitter->addWidget(mTab);
  splitter->addWidget(mPlotSheet);

  QVBoxLayout* vbox = new QVBoxLayout;
  vbox->addWidget(splitter);

  mMainBox = new QGroupBox(tr("Choose a FI to view and edit the details"));
  mMainBox->setLayout(vbox);

  vbox = new QVBoxLayout;
  vbox->addWidget(mMainBox);
  setLayout(vbox);
}
开发者ID:loh-tar,项目名称:filu,代码行数:27,代码来源:FiPage.cpp

示例7: createCentralWidget

void MainWindow::createCentralWidget()
{
	setCentralWidget(new QSplitter(this));
	QSplitter* splitter = static_cast<QSplitter*>(centralWidget());
	splitter->addWidget(new AccountTreeView);
	splitter->addWidget(createRightView());
}
开发者ID:adam-zhang,项目名称:tiger,代码行数:7,代码来源:MainWindow.cpp

示例8: createPanel

void MainWindow::createPanel()
{
  QSplitter *splitter = new QSplitter;
  //-- Create left panel
  m_tabWidget = new QTabWidget;
  //-- Create right panel
  m_widget = new control_point_GUI::GraphicsMainWindow(m_doc, this);
  splitter->addWidget(m_tabWidget);
  splitter->addWidget(m_widget);
  splitter->setStretchFactor(0, 0);
  splitter->setStretchFactor(1, 1);
  setCentralWidget(splitter);

  //-- Add tab inside the m_tabWidget
  m_tab_1 = new QWidget;
  m_tab_1->setObjectName(QString::fromUtf8("m_tab_1"));
  m_tabWidget->addTab(m_tab_1, QString());
  m_tabWidget->setTabText(m_tabWidget->indexOf(m_tab_1), "ImageList");

  //-- Configure tab widgets
  m_treeView_Images = new QTreeView(m_tab_1);
  m_treeView_Images->setRootIsDecorated(false);
  m_treeView_Images->setEditTriggers(QAbstractItemView::NoEditTriggers);
  m_treeView_Images->setObjectName(QString::fromUtf8("m_treeView_Images"));
  m_treeView_Images->setSortingEnabled(true);

  QGridLayout * gridLayout1 = new QGridLayout(m_tab_1);
  gridLayout1->addWidget(m_treeView_Images, 0, 0, 1, 1);
}
开发者ID:DirSch,项目名称:openMVG,代码行数:29,代码来源:mainLayout.cpp

示例9: FWindowTab

FViewer3d::FViewer3d(QWidget *parent)
    : FWindowTab(parent)
{

    Chart3d = new FChart3d;
    Chart3d->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

    TableChart3d = new QTableWidget(this);
    TableChart3d->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
    TableChart3d->setSelectionMode(QAbstractItemView::SingleSelection);

    CreateActions();
    CreateToolBar();

    QSplitter *Splitter = new QSplitter;
    Splitter->setOrientation(Qt::Horizontal);
    Splitter->setContentsMargins(0,0,0,0);
    Splitter->addWidget(Chart3d);
    Splitter->addWidget(TableChart3d);

    QVBoxLayout *vertLayout = new QVBoxLayout;
    vertLayout->setContentsMargins(0,0,0,0);
    vertLayout->setSpacing(0);
    vertLayout->addWidget(ToolBar);
    vertLayout->addWidget(Splitter);
    this->setLayout(vertLayout);

    CreateConnections();
}
开发者ID:rafaelfassi,项目名称:fassichip,代码行数:29,代码来源:fviewer3d.cpp

示例10: QWidget

    QueryWidget::QueryWidget(IServerSPtr server, QWidget* parent)
        : QWidget(parent)
    {
        shellWidget_ = new BaseShellWidget(server);
        outputWidget_ = new OutputWidget(server);

        VERIFY(connect(shellWidget_, &BaseShellWidget::rootCreated, outputWidget_, &OutputWidget::rootCreate));
        VERIFY(connect(shellWidget_, &BaseShellWidget::rootCompleated, outputWidget_, &OutputWidget::rootCompleate));

        VERIFY(connect(shellWidget_, &BaseShellWidget::addedChild, outputWidget_, &OutputWidget::addChild));
        VERIFY(connect(shellWidget_, &BaseShellWidget::itemUpdated, outputWidget_, &OutputWidget::itemUpdate));

        QSplitter* splitter = new QSplitter;
#ifdef OS_WIN
        splitter->setStyleSheet("QSplitter::handle { background-color: gray }");
#endif
        splitter->setOrientation(Qt::Vertical);
        splitter->setHandleWidth(1);

        QVBoxLayout *mainLayout = new QVBoxLayout;
        splitter->addWidget(shellWidget_);
        splitter->addWidget(outputWidget_);
        splitter->setStretchFactor(0, 0);
        splitter->setStretchFactor(1, 1);
        mainLayout->addWidget(splitter);
        setMinimumSize(QSize(min_width, min_height));

        setLayout(mainLayout);
    }
开发者ID:tempbottle,项目名称:fastonosql,代码行数:29,代码来源:query_widget.cpp

示例11: setupLayout

void DlgCustomizeSpaceball::setupLayout()
{
    QLabel *buttonLabel = new QLabel(tr("Buttons"), this);
    clearButton = new QPushButton(tr("Clear"), this);
    QVBoxLayout *buttonGroup = new QVBoxLayout();
    buttonGroup->addWidget(buttonLabel);
    buttonGroup->addWidget(buttonView);
    QHBoxLayout *clearLayout = new QHBoxLayout();
    clearLayout->addWidget(clearButton);
    clearLayout->addStretch();
    buttonGroup->addLayout(clearLayout);

    QSplitter *splitter = new QSplitter(this);
    QWidget *leftPane = new QWidget(this);
    leftPane->setLayout(buttonGroup);
    splitter->addWidget(leftPane);
    splitter->addWidget(commandView);

    printReference = new QPushButton(tr("Print Reference"), this);
    QHBoxLayout *printLayout = new QHBoxLayout();
    printLayout->addStretch();
    printLayout->addWidget(printReference);

    QVBoxLayout *layout = new QVBoxLayout();
    layout->addWidget(splitter);
    layout->addLayout(printLayout);

    this->setLayout(layout);

    QList<int> sizes;
    sizes << this->size().width()*0.40;
    sizes << this->size().width()-sizes.at(0);
    splitter->setSizes(sizes);
}
开发者ID:3DPrinterGuy,项目名称:FreeCAD,代码行数:34,代码来源:DlgCustomizeSpaceball.cpp

示例12: QWidget

		main_window()
		{
			
			QWidget * top = new QWidget(this);	
			m_layout = new QGridLayout(top);
			setCentralWidget(top);
			
			m_first = new draw_widget(top);
			m_second = new draw_widget(top);
			m_third = new draw_widget(top);
			
			m_top_splitter = new QSplitter(top);
			m_top_splitter->addWidget(m_first);
			
			QSplitter * other = new QSplitter(top);
			other->addWidget(m_second);
		
			
			QSplitter * another = new QSplitter(top);
			another->addWidget(m_third);
			another->setOrientation(Qt::Horizontal);
			
			
			m_layout->addWidget(m_top_splitter,0,0);
			m_layout->addWidget(other,1,0,1,2);
			m_layout->addWidget(another,0,1);
			
		}
开发者ID:mbouzid,项目名称:Painte,代码行数:28,代码来源:main_window.hpp

示例13: Player

MainWindow::MainWindow(FilesList *filesList)
{
    this->filesList = filesList;

    player = new Player(this);
    filesListWidget = new FilesListWidget(this->filesList, this);
    filesCountLabel = new QLabel(FILES_COUNT_TEXT.arg(0), this);

    QSplitter *splitter = new QSplitter(Qt::Vertical, this);
    //splitter->setStyleSheet("QSplitter::handle {background-color: black;}");

    splitter->addWidget(initVideoFrame());
    splitter->addWidget(initControlFrame());
    splitter->setChildrenCollapsible(false);
    //splitter->setCursor(Qt::SizeVerCursor);
    splitter->setHandleWidth(10);

    initMenu();
    setCentralWidget(splitter);
    setWindowTitle("Visual Renamer");
    setWindowIcon(QIcon(":/resources/logo_small.png"));
    resize(850, 650);

    connect(filesListWidget, SIGNAL(fileSelected(int)), SLOT(fileSelected(int)));
    connect(this->filesList, SIGNAL(renamed(int,int)), SLOT(filesRenamed(int,int)));
    connect(this->filesList, &FilesList::reseted, this, [=](){fileSelected(-1); filesCountLabel->setText(FILES_COUNT_TEXT.arg(this->filesList->getSize()));});
    connect(this->filesList, &FilesList::filesAdded, this, [=](){filesCountLabel->setText(FILES_COUNT_TEXT.arg(this->filesList->getSize()));});
    connect(this->filesList, &FilesList::removed, this, [=](){fileSelected(-1); filesCountLabel->setText(FILES_COUNT_TEXT.arg(this->filesList->getSize()));});

    this->setFocus();
}
开发者ID:AzanovAA,项目名称:MediaRenamer,代码行数:31,代码来源:mainwindow.cpp

示例14: setupWindowButtons

    void MainWindow::setupWindowButtons()
    {
        m_videoDetailsList->setStyleSheet("QWidget{height: 20px;}");

        QWidget *widget = new QWidget;
        QVBoxLayout *vLayout = new QVBoxLayout( widget );
        vLayout->addWidget( m_filterList, 1 );
        vLayout->addWidget( m_filterByUploadDateButton );
        vLayout->addWidget( m_filterByTypeButton );
        vLayout->addWidget( m_filterByDurationButton );
        vLayout->addWidget( m_filterByFeaturesButton );
        vLayout->addWidget( m_filterBySortButton );

        QSplitter *splitter = new QSplitter( Qt::Vertical );
        splitter->addWidget( m_videoDisplayTable );
        splitter->addWidget( m_videoDetailsList );
        splitter->setStretchFactor( 0, 1 );

        QSplitter *new_splitter = new QSplitter( Qt::Horizontal );
        new_splitter->addWidget( widget );
        new_splitter->addWidget( splitter );
        new_splitter->setStretchFactor( 1, 1 );

        m_filterByUploadDateButton->click();
        setCentralWidget( new_splitter );
    }
开发者ID:karllen,项目名称:Hend_Old,代码行数:26,代码来源:mainwindow.cpp

示例15: QSplitter

MainWindow::MainWindow(Sampler* sampler)
: m_sampler(sampler), m_view(NULL), m_lut_index(-1)
, m_seed(0), m_spaceSize(0.21), m_min_density(1), m_max_density(4e3), m_min_level(0), m_max_level(1), m_min_rank(0), m_max_rank(1), m_offsetInterpolate(true), m_dither(true)
, m_crop(true)
, m_DFunc(&dFunc_constant), m_image()//"data/img/butterfly.png")
{
	//~ qRegisterMetaType<PickedValue>("PickedValue");

	//main window properties
	this->resize(1024, 700);
	this->setWindowTitle(tr("Sampler"));

	//splitter ( view | options )
	QSplitter* splitter = new QSplitter();
	this->setCentralWidget(splitter);

	m_view = new PointSetView();
	createOptionPanel();
	splitter->addWidget(m_view);
	splitter->setStretchFactor(0,1);
	splitter->addWidget(options);
	splitter->setStretchFactor(1,0);

	setDensityMin();
	setDensityMax();

	createStatusBar();
	connect(m_view, SIGNAL(pointsetCursorMoved(float, float)), this, SLOT(showCoordinates(float, float)));
}
开发者ID:herculesyuan,项目名称:sampler,代码行数:29,代码来源:window.cpp


注:本文中的QSplitter::addWidget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。