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


C++ QScrollArea::setFrameStyle方法代码示例

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


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

示例1: QWidget

ZoneChooserView::ZoneChooserView(QWidget* parent)
    : QWidget(parent)
{
    QVBoxLayout * mainLayout = new QVBoxLayout();

    mainLayout->setContentsMargins(0,0,0,0);

    this->setLayout(mainLayout);

    QScrollArea * scrollArea = new QScrollArea();

    scrollArea->setWidgetResizable(true);

    scrollArea->setFrameStyle(QFrame::NoFrame);

    mainLayout->addWidget(scrollArea);

    QWidget * scrollWidget = new QWidget();

    scrollArea->setWidget(scrollWidget);

    m_vLayout = new QVBoxLayout();

    m_vLayout->setContentsMargins(0,0,0,0);

    scrollWidget->setLayout(m_vLayout);
}
开发者ID:CraigCasey,项目名称:OpenStudio,代码行数:27,代码来源:ZoneChooserView.cpp

示例2: rowsInserted

void SettingsBottomView::rowsInserted(
  const QModelIndex& parent, int start, int end) {
  QModelIndex index;
  QGridLayout* layout;
  QWidget* page;

  if (!parent.isValid()) {
    layout = new QGridLayout();

    layout->setHorizontalSpacing(5);
    layout->setVerticalSpacing(5);
    layout->setContentsMargins(5, 5, 5, 5);

    QScrollArea* scrollArea = new QScrollArea();

    page = new QWidget();
    page->setLayout(layout);
    page->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
    page->setMinimumSize(0, 0);

    scrollArea->setFrameStyle(QFrame::NoFrame);
    scrollArea->setWidget(page);
    scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    stack->addWidget(scrollArea);
  }

  // Invalid insertion index will mark insertion of a group
  insertionIndex = parent;
}
开发者ID:Sylla,项目名称:updraft,代码行数:30,代码来源:settingsbottomview.cpp

示例3: createEditors

void SettingsBottomView::createEditors() {
  QModelIndex index;
  QGridLayout* layout;

  if (!model()) {
    return;
  }

  delete stack;
  stack = new QStackedWidget(this);

  for (int page = 0; page < model()->rowCount(); ++page) {
    layout = new QGridLayout();

    // Create labels and editors
    index = model()->index(page, 0);
    int row;
    for (row = 0; row < model()->rowCount(index); ++row) {
      QModelIndex child = model()->index(row, 0, index);
      QString description = getSettingDescription(child);

      QLabel* label = new QLabel(description, NULL);
      label->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
      layout->addWidget(label, row, 0);

      QWidget* editor = createEditorForIndex(child);
      editor->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
      layout->addWidget(editor, row, 1);

      editor->show();
    }

    // Adding a stretcher at the bottom of all settings
    QWidget* dummy = new QWidget();
    layout->addWidget(dummy, row, 0);
    layout->setRowStretch(row, 1);

    // Setting space on the page
    layout->setHorizontalSpacing(5);
    layout->setVerticalSpacing(5);
    layout->setContentsMargins(5, 5, 5, 5);

    QScrollArea* scrollArea = new QScrollArea();

    QWidget* pageWidget = new QWidget();
    pageWidget->setLayout(layout);
    pageWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
    pageWidget->setMinimumSize(0, 0);

    scrollArea->setFrameStyle(QFrame::NoFrame);
    scrollArea->setWidget(pageWidget);
    scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    stack->addWidget(scrollArea);
  }

  this->layout()->addWidget(stack);
}
开发者ID:Sylla,项目名称:updraft,代码行数:58,代码来源:settingsbottomview.cpp

示例4: initUi

void AppearanceSettings::initUi()
{
    m_themeCombo = new QComboBox;
    m_themeCombo->setModel(new QStringListModel(this));
    connect(m_themeCombo, SIGNAL(currentIndexChanged(int)), SLOT(themeChanged(int)));

    m_colorCombo = new QComboBox;
    m_colorCombo->setModel(new QStringListModel(this));
    connect(m_colorCombo, SIGNAL(currentIndexChanged(int)), SLOT(colorChanged(int)));

    m_backgroundCombo = new QComboBox;
    m_backgroundCombo->setModel(new QStringListModel(this));
    connect(m_backgroundCombo, SIGNAL(currentIndexChanged(int)), SLOT(backgroundChanged(int)));

    m_softKeyIconCheck = new QCheckBox(tr("Use icons for soft keys"));
    gConfig.beginGroup("ContextMenu");
    int labelType = (QSoftMenuBar::LabelType)gConfig.value("LabelType", QSoftMenuBar::TextLabel).toInt();
    gConfig.endGroup();
    m_softKeyIconCheck->setChecked(labelType == QSoftMenuBar::IconLabel);
    connect(m_softKeyIconCheck, SIGNAL(clicked(bool)), SLOT(softKeyOptionChanged()));

    QFormLayout *form = new QFormLayout;
    form->addRow(tr("Theme"), m_themeCombo);
    form->addRow(tr("Color"), m_colorCombo);
    form->addRow(tr("Background"), m_backgroundCombo);
    form->addRow(m_softKeyIconCheck);
    form->setAlignment(m_softKeyIconCheck, Qt::AlignCenter);

    m_previewTitle = new QLabel;
    m_previewSoftMenuBar = new QLabel;
    m_previewBackground = new QLabel;

    QGridLayout *previewGrid = new QGridLayout;
    previewGrid->setMargin(10);
    previewGrid->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
    previewGrid->addWidget(m_previewTitle, 0, 0);
    previewGrid->addWidget(m_previewSoftMenuBar, 1, 0);
    previewGrid->addWidget(m_previewBackground, 0, 1, 2, 1);

    m_previewBox = new QGroupBox;
    m_previewBox->setLayout(previewGrid);
    form->addRow(m_previewBox);
    m_previewBox->hide();   // hide until a preview is shown

    QScrollArea *scroll = new QScrollArea;
    scroll->setFocusPolicy(Qt::NoFocus);
    scroll->setFrameStyle(QFrame::NoFrame);
    QWidget *w = new QWidget;
    w->setLayout(form);
    scroll->setWidget(w);
    scroll->setWidgetResizable(true);
    scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    QVBoxLayout *mainLayout = new QVBoxLayout(this);
    mainLayout->setContentsMargins(0, 0, 0, 0);
    mainLayout->addWidget(scroll);
    setLayout(mainLayout);
}
开发者ID:Artox,项目名称:qtmoko,代码行数:58,代码来源:appearance.cpp

示例5: QScrollArea

QScrollArea *SystemInfo::wrapWithScrollArea(QWidget *widget)
{
    QScrollArea *sv = new QScrollArea();
    sv->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    sv->setFrameStyle(QFrame::NoFrame);
    sv->setWidgetResizable(true);
    sv->setWidget( widget );
    sv->setFocusPolicy( Qt::TabFocus );
    return sv;
}
开发者ID:Camelek,项目名称:qtmoko,代码行数:10,代码来源:sysinfo.cpp

示例6: addPage

 void addPage(const QString &name)
 {
     TypeFormatsDialogPage *page = new TypeFormatsDialogPage;
     pages.append(page);
     QScrollArea *scroller = new QScrollArea;
     scroller->setWidgetResizable(true);
     scroller->setWidget(page);
     scroller->setFrameStyle(QFrame::NoFrame);
     tabs->addTab(scroller, name);
 }
开发者ID:jlehtoranta,项目名称:sailfish-qtcreator,代码行数:10,代码来源:debuggerdialogs.cpp

示例7: icon

PreviewDialog::PreviewDialog(QWidget *parent) : DragWidget(parent)
{
    m_borderImage = false;
    setAutoFillBackground(true);

    m_label = new PreviewLabel(this);
    m_slider = new QSlider(this);

    m_zoomLabel = new QLabel(this);

    setZoom(1);

    QVBoxLayout *layout = new QVBoxLayout(this);
    QHBoxLayout *horizontalLayout = new QHBoxLayout();
    QHBoxLayout *horizontalLayout2 = new QHBoxLayout();
    layout->setMargin(0);
    layout->setContentsMargins(2, 2, 2, 16);
    layout->setSpacing(4);
    QToolButton *toolButton = new QToolButton(this);
    QIcon icon(style()->standardIcon(QStyle::SP_DockWidgetCloseButton));
    toolButton->setIcon(icon);
    toolButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
    toolButton->setFixedSize(icon.availableSizes().value(0) + QSize(4, 4));
    connect(toolButton, SIGNAL(clicked()), this, SLOT(onTogglePane()));

    QScrollArea *scrollArea = new QScrollArea(this);
    WheelFilter *wheelFilter = new WheelFilter(scrollArea);
    scrollArea->setWidget(m_label);
    scrollArea->setFrameStyle(QFrame::NoFrame);
    m_slider->setOrientation(Qt::Horizontal);
    m_slider->setRange(1, 6);
    m_slider->setFixedWidth(80);
    m_zoomLabel->setFixedWidth(50);

    horizontalLayout->addWidget(toolButton);
    horizontalLayout->addSpacing(6);
    horizontalLayout->addWidget(m_slider);
    horizontalLayout->addSpacing(6);
    horizontalLayout->addWidget(m_zoomLabel);
    horizontalLayout->addStretch(1);

    layout->addLayout(horizontalLayout);
    horizontalLayout2->addSpacing(24);
    horizontalLayout2->addWidget(scrollArea);
    layout->addLayout(horizontalLayout2);

    wheelFilter->setTarget(this);

    connect(m_slider, SIGNAL(valueChanged(int)), this, SLOT(onSliderMoved(int)));

    foreach (QWidget *childWidget, findChildren<QWidget*>()) {
        childWidget->installEventFilter(wheelFilter);
    }
开发者ID:anchowee,项目名称:QtCreator,代码行数:53,代码来源:contextpanewidgetimage.cpp

示例8: QWidget

NotifyManager::NotifyManager(QWidget *parent) :
    QWidget(parent),
    m_dbus(new Notification("com.deepin.dde.Notification", "/com/deepin/dde/Notification", QDBusConnection::sessionBus(), this))
{
    QWidget *widget = new QWidget;

    m_connectLayout = new QVBoxLayout(widget);
    m_connectLayout->setMargin(0);
    m_connectLayout->setSpacing(1);
    m_connectLayout->addStretch();

    QScrollArea *scrollarea = new QScrollArea;
    scrollarea->setWidget(widget);
    scrollarea->setObjectName("scrollarea");
    scrollarea->setWidgetResizable(true);
    scrollarea->setFocusPolicy(Qt::NoFocus);
    scrollarea->setFrameStyle(QFrame::NoFrame);
    scrollarea->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
    scrollarea->setContentsMargins(0, 0, 0, 0);
    scrollarea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    scrollarea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    scrollarea->setStyleSheet("background-color:transparent;");

    QScrollBar *bar = scrollarea->verticalScrollBar();
    connect(bar, &QScrollBar::valueChanged, this, [=](int value){
            if (m_checkIndex && value == bar->maximum())
                onLoadAgain();
    });

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->setMargin(0);
    mainLayout->setSpacing(0);

    m_clearButton = new DImageButton;
    m_clearButton->setText(tr("Clear all"));
    m_clearButton->setStyleSheet("padding: 4px 0;");

    mainLayout->addWidget(m_clearButton, 0, Qt::AlignHCenter);
    mainLayout->addWidget(scrollarea);

    setLayout(mainLayout);

    m_clearButton->setVisible(false);

    connect(m_clearButton, &DImageButton::clicked, this, &NotifyManager::onCloseAllItem);
    connect(m_dbus, &Notification::RecordAdded, this, &NotifyManager::onNotifyAdded);

    m_dbus->setSync(false);

    QDBusPendingReply<QString> notify = m_dbus->GetAllRecords();
    QDBusPendingCallWatcher *notifyWatcher = new QDBusPendingCallWatcher(notify, this);
    connect(notifyWatcher, &QDBusPendingCallWatcher::finished, this, &NotifyManager::onNotifyGetAllFinished);
}
开发者ID:ghj1040110333,项目名称:dde-control-center,代码行数:53,代码来源:notifymanager.cpp

示例9: createTab

QWidget* KgGeneral::createTab(QString name)
{
    QScrollArea *scrollArea = new QScrollArea(tabWidget);
    tabWidget->addTab(scrollArea, name);
    scrollArea->setFrameStyle(QFrame::NoFrame);
    scrollArea->setWidgetResizable(true);

    QWidget *tab = new QWidget(scrollArea);
    scrollArea->setWidget(tab);

    return tab;
}
开发者ID:KDE,项目名称:krusader,代码行数:12,代码来源:kggeneral.cpp

示例10: QWidget

Paintbox::Paintbox(QWidget * parent, Qt::WindowFlags flags) : QWidget(parent, flags)
{
	setupUi(this);
	
	stacks = new QUndoGroup(this);
	
	QIcon undo = undo_button->icon();
	undo_button->setDefaultAction(stacks->createUndoAction(undo_button));
	undo_button->defaultAction()->setIcon(undo);

	QIcon redo = redo_button->icon();
	redo_button->setDefaultAction(stacks->createRedoAction(redo_button));
	redo_button->defaultAction()->setIcon(redo);
	
	setUndoStack(parent);	
	
	active = COLOR_PAINT;
	gradient_frame->setHidden(true);
	pick_frame->setHidden(true);
	smooth_frame->setHidden(true);
	mesh_displacement_frame->setHidden(true);
	clone_source_frame->setHidden(true);
	noise_frame->setHidden(true);
	
	brush_viewer->setScene(new QGraphicsScene());
	
	clone_source_view->setScene(new QGraphicsScene());
	clone_source_view->centerOn(0, 0);
	
	item = NULL;
	pixmap_available = false;
	
	//******QT 4.3 Workaround**********
	QScrollArea * scrollArea = new QScrollArea(this);
	gridLayout->removeWidget(widget);
	scrollArea->setWidget(widget);
	static_cast<QGridLayout * >(widget->layout())->addItem(new QSpacerItem(0, 20, QSizePolicy::Minimum, QSizePolicy::Expanding), 11, 0, 1, 2);
	widget->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding));
	scrollArea->setFrameStyle(QFrame::NoFrame);
	scrollArea->setWidgetResizable(true);
	scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	scrollArea->adjustSize();
	gridLayout->addWidget(scrollArea, 2, 1, 1, 1);
	//**********************************
	
	QObject::connect(clone_source_view, SIGNAL(positionChanged(double, double)), this, SLOT(movePixmapDelta(double, double)));
	QObject::connect(clone_source_view, SIGNAL(positionReset()), this, SLOT(resetPixmapDelta()));

	refreshBrushPreview();
}
开发者ID:Jerdak,项目名称:meshlab,代码行数:50,代码来源:paintbox.cpp

示例11: SettingsWidget

XSettingsWidget::XSettingsWidget(QWidget *parent) :
    SettingsWidget(parent)
{
	QVBoxLayout *mainLayout = new QVBoxLayout(this);
	QScrollArea *area = new QScrollArea(this);
	QWidget *mainWidget = new QWidget(area);
	area->setWidget(mainWidget);
	area->setWidgetResizable(true);
	area->setFrameStyle(QFrame::NoFrame);
	mainLayout->setContentsMargins(0, 0, 0, 0);
	mainLayout->addWidget(area);
	m_layout = new QVBoxLayout(mainWidget);
	m_layout->setContentsMargins(0, 0, 0, 0);
}
开发者ID:AlexeyProkhin,项目名称:qutim,代码行数:14,代码来源:xsettingswidget.cpp

示例12: QMainWindow

Qt_launchpad::Qt_launchpad(unsigned long initial_quota, QWidget *parent)
    : QMainWindow(parent), Launchpad(initial_quota)
{
	setupUi(this);

	// disable minimize and maximize buttons
	Qt::WindowFlags flags = windowFlags();
	flags &= ((~Qt::WindowMinMaxButtonsHint)|(Qt::WindowStaysOnTopHint));
	setWindowFlags(flags);

	// To trigger lastWindowClosed()
	setAttribute(Qt::WA_QuitOnClose, true);

	launcherDockWidgetContents = new QToolBox();
	// put a QScrollArea into launcherDockWidget for scrolling of launcher entries
  	/*QScrollArea *launcherScrollArea = new QScrollArea;
	launcherScrollArea->setFrameStyle(QFrame::NoFrame);
	launcherScrollArea->setWidget(launcherDockWidgetContents);*/
	launcherDockWidget->setWidget(launcherDockWidgetContents);
	launcherDockWidget->setFont(QFont("OS5",12,QFont::Bold));

	// put a QScrollArea into childrenDockWidget for scrolling of child entries
  	QScrollArea *childrenScrollArea = new QScrollArea;
	childrenScrollArea->setFrameStyle(QFrame::NoFrame);
	childrenScrollArea->setWidget(childrenDockWidgetContents);
	
	childrenDockWidget->setWidget(childrenScrollArea);
	childrenDockWidget->setFont(QFont("OS5",12,QFont::Bold));
	
	QVBoxLayout *childrenDockWidgetLayout = new QVBoxLayout;
	childrenDockWidgetLayout->setContentsMargins(0, 0, 0, 0);
	childrenDockWidgetLayout->setSpacing(0);
	childrenDockWidgetLayout->setAlignment(Qt::AlignTop);
	childrenDockWidgetContents->setLayout(childrenDockWidgetLayout);
	childrenDockWidget->hide();
	statusDockWidget->hide();

	QObject::connect(childrenDockWidget,SIGNAL(topLevelChanged(bool)),this,SLOT(enlarge_childrenDockWg(bool)));
	QObject::connect(statusDockWidget,SIGNAL(topLevelChanged(bool)),this,SLOT(enlarge_statusDockWg(bool)));

	// update the available quota bar every 200ms
	QTimer *avail_quota_timer = new QTimer(this);
	connect(avail_quota_timer, SIGNAL(timeout()), this, SLOT(avail_quota_update()));
	avail_quota_timer->start(200);
	Middle* middle=new Middle();
	QObject::connect(middle,SIGNAL(quit_child()),this,SLOT(close_child()));
	QObject::connect(this,SIGNAL(unlock_child()),middle,SLOT(unlock()));	
	middle->start();
}
开发者ID:kloisiie,项目名称:vsos,代码行数:49,代码来源:qt_launchpad.cpp

示例13: QAbstractPageWidget

QProjectWidget::QProjectWidget(QWidget * parent):
    QAbstractPageWidget(parent),
    m_projectPropertyView(new QPropertyListView(this)),
    m_projectBar(new StyledBar(this)),
    m_pageView(new QPageView(this)),
    m_pageViewBar(new StyledBar(this))
{
    QVBoxLayout *vl = new QVBoxLayout;

    MiniSplitter *sp = new MiniSplitter;

    vl->setMargin(0);
    vl->addWidget(sp);
    setLayout(vl);

    QWidget* wid = new QWidget;

    sp->addWidget(wid);

    vl = new QVBoxLayout;
    vl->setMargin(0);
    vl->setSpacing(0);
    vl->addWidget(m_projectBar);
    vl->addWidget(m_projectPropertyView);
    wid->setLayout(vl);

    QScrollArea * pagePane = new QScrollArea;
    pagePane->setWidget(m_pageView);
    pagePane->setFrameStyle(QFrame::NoFrame);
    pagePane->viewport()->setStyleSheet("background-color:rgb(255,255,255);");

    wid = new QWidget;
    vl = new QVBoxLayout;
    vl->setMargin(0);
    vl->setSpacing(0);
    vl->addWidget(m_pageViewBar);
    vl->addWidget(pagePane);
    wid->setLayout(vl);

    sp->addWidget(wid);

    sp->setStretchFactor(0,0);
    sp->setStretchFactor(1,1);

    connect(QSoftCore::getInstance()->getProject(),SIGNAL(hostAdded(QAbstractWidgetHost*,int)),
            m_pageView,SLOT(addHost(QAbstractWidgetHost*,int)));
}
开发者ID:hermixy,项目名称:Device_Studio,代码行数:47,代码来源:qprojectwidget.cpp

示例14: QCommDeviceController

BTSettingsMainWindow::BTSettingsMainWindow(QWidget *parent, Qt::WFlags fl)
    : QMainWindow(parent, fl), m_localDevice(new QBluetoothLocalDevice(this)),
      m_controller(0)
{
    if (!m_localDevice->isValid()) {
        QLabel *label = new QLabel(tr("(Bluetooth not available.)"));
        label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
        label->setWordWrap(true);
        label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
        setCentralWidget(label);
        return;
    }

    QScrollArea* scroll = new QScrollArea();
    scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    scroll->setWidgetResizable(true);
    scroll->setFrameStyle(QFrame::NoFrame);

    m_menu = QSoftMenuBar::menuFor(this);
    m_tabs = new QTabWidget();

    m_controller =
            new QCommDeviceController(m_localDevice->deviceName().toLatin1(), this);

    SettingsDisplay *settings = new SettingsDisplay(m_localDevice, m_controller);
    scroll->setWidget(settings);
    scroll->setFocusProxy(settings);
    m_tabs->addTab(scroll, tr("Settings"));

    // Delay initialization of tabs other than the first
    m_tabs->addTab(new QWidget, tr("Paired Devices"));
    m_tabs->setTabEnabled(1, false);

    m_tabs->setCurrentIndex(0);

    // change the context menu when the tab changes
    connect(m_tabs, SIGNAL(currentChanged(int)), SLOT(tabChanged(int)));

    // set the current context menu
    tabChanged(m_tabs->currentIndex());

    setCentralWidget(m_tabs);
    setWindowTitle(tr("Bluetooth"));

    QTimer::singleShot(0, this, SLOT(init()));
}
开发者ID:Camelek,项目名称:qtmoko,代码行数:46,代码来源:btsettings.cpp

示例15: createLayout

void SyncMeasuresDialog::createLayout()
{
  setWindowTitle("Updates Available in Library");

  setModal(true);

  setSizeGripEnabled(true);

  setObjectName("BlueGradientWidget");

  // The central pane
  m_centralWidget = new SyncMeasuresDialogCentralWidget(m_project, m_measureManager);

  connect(m_centralWidget, &SyncMeasuresDialogCentralWidget::componentClicked, this, &SyncMeasuresDialog::on_componentClicked);

  connect(m_centralWidget, &SyncMeasuresDialogCentralWidget::noComponents, this, &SyncMeasuresDialog::on_noComponents);

  connect(m_centralWidget, &SyncMeasuresDialogCentralWidget::closeDlg, this, &SyncMeasuresDialog::closeDlg);

  QScrollArea * centralScrollArea = new QScrollArea(this);
  centralScrollArea->setFrameStyle(QFrame::NoFrame);
  centralScrollArea->setObjectName("GrayWidget");
  centralScrollArea->setWidgetResizable(true);
  centralScrollArea->setWidget(m_centralWidget);

  // The right pane

  m_rightScrollArea = new QScrollArea(this);
  m_rightScrollArea->setFrameStyle(QFrame::NoFrame);
  m_rightScrollArea->setObjectName("GrayWidget");
  m_rightScrollArea->setWidgetResizable(true);

  QSplitter * splitter = new QSplitter(this);
  splitter->setOrientation(Qt::Horizontal);
  splitter->addWidget(centralScrollArea);
  splitter->addWidget(m_rightScrollArea);

  QHBoxLayout * mainLayout = new QHBoxLayout();
  mainLayout->addWidget(splitter);

  setLayout(mainLayout);

  m_centralWidget->lowerPushButton->setFocus();

}
开发者ID:pepsi7959,项目名称:OpenStudio,代码行数:45,代码来源:SyncMeasuresDialog.cpp


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