• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setWidgetResizable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setWidgetResizable函数的典型用法代码示例。如果您正苦于以下问题:C++ setWidgetResizable函数的具体用法?C++ setWidgetResizable怎么用?C++ setWidgetResizable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: switch

void PaintWidget::setViewportType( const PaintWidget::ViewportType t )
{
    switch( t )
    {
        case fixedViewport:
            painter.fixedSize = false;
            setWidgetResizable( false );
            painter.resize( painter.size );
            break;

        case resizableViewport:
            painter.fixedSize = false;
            setWidgetResizable( true );
            break;

        case hintViewport:
            painter.fixedSize = true;
            setWidgetResizable( true );
            break;
    }

    setAlignment( Qt::AlignCenter );
    painter.update();
    update();
}
开发者ID:maratjob,项目名称:MultiFusion,代码行数:25,代码来源:PaintWidget.cpp


示例2: QScrollArea

/* default constructor */
rfc::gui::DiscAbstract::DiscAbstract(QWidget *parent) :
    QScrollArea(parent)
{
    QWidget *widg = new QWidget();

    setWidgetResizable(true);
    setWidget(widg);

    QVBoxLayout *lay = new QVBoxLayout(widg);
	QHBoxLayout *butsLay = new QHBoxLayout;

	activator = new QPushButton(lang::activate, this);
	connect(activator, SIGNAL(clicked(bool)),
			this, SLOT(slotActivateDiscipline()));

	butsLay->addWidget(activator);

	/* finalizer button */
	finalizer = new QPushButton(lang::finalize, this);
	finalizer->setEnabled(false);
	connect(finalizer, SIGNAL(clicked(bool)),
			this, SLOT(slotFinalize()));

	butsLay->addWidget(finalizer);

	lay->addLayout(butsLay);
} /* end of 'Qualify' constructor */
开发者ID:kbsx32,项目名称:raftcomp,代码行数:28,代码来源:gui_disc_abstract.cpp


示例3: QScrollArea

PrettyImageView::PrettyImageView(QNetworkAccessManager* network,
                                 QWidget* parent)
    : QScrollArea(parent),
      network_(network),
      container_(new QWidget(this)),
      layout_(new QHBoxLayout(container_)),
      current_index_(-1),
      scroll_animation_(
          new QPropertyAnimation(horizontalScrollBar(), "value", this)),
      recursion_filter_(false) {
  setWidget(container_);
  setWidgetResizable(true);
  setMinimumHeight(PrettyImage::kTotalHeight + 10);
  setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
  setFrameShape(QFrame::NoFrame);
  setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

  scroll_animation_->setDuration(250);
  scroll_animation_->setEasingCurve(QEasingCurve::InOutCubic);
  connect(horizontalScrollBar(), SIGNAL(sliderReleased()),
          SLOT(ScrollBarReleased()));
  connect(horizontalScrollBar(), SIGNAL(actionTriggered(int)),
          SLOT(ScrollBarAction(int)));

  layout_->setSizeConstraint(QLayout::SetMinAndMaxSize);
  layout_->setContentsMargins(6, 6, 6, 6);
  layout_->setSpacing(6);
  layout_->addSpacing(200);
  layout_->addSpacing(200);

  container_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
}
开发者ID:Aceler,项目名称:Clementine,代码行数:32,代码来源:prettyimageview.cpp


示例4: PageBase

    KeyBindingPage::KeyBindingPage(CSMPrefs::Category& category, QWidget* parent)
        : PageBase(category, parent)
        , mStackedLayout(0)
        , mPageLayout(0)
        , mPageSelector(0)
    {
        // Need one widget for scroll area
        QWidget* topWidget = new QWidget();
        QVBoxLayout* topLayout = new QVBoxLayout(topWidget);

        // Allows switching between "pages"
        QWidget* stackedWidget = new QWidget();
        mStackedLayout = new QStackedLayout(stackedWidget);

        mPageSelector = new QComboBox();
        connect(mPageSelector, SIGNAL(currentIndexChanged(int)), mStackedLayout, SLOT(setCurrentIndex(int)));

        topLayout->addWidget(mPageSelector);
        topLayout->addWidget(stackedWidget);
        topLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);

        // Add each option
        for (CSMPrefs::Category::Iterator iter = category.begin(); iter!=category.end(); ++iter)
            addSetting (*iter);

        setWidgetResizable(true);
        setWidget(topWidget);
    }
开发者ID:A1-Triard,项目名称:openmw,代码行数:28,代码来源:keybindingpage.cpp


示例5: QScrollArea

SetupPlugins::SetupPlugins(QWidget* parent)
    : QScrollArea(parent), d(new SetupPluginsPriv)
{
    QWidget* panel = new QWidget(viewport());
    setWidget(panel);
    setWidgetResizable(true);

    QVBoxLayout* layout = new QVBoxLayout(panel);
    d->pluginsNumber    = new QLabel(panel);

    if (KIPI::PluginLoader::instance())
    {
        d->kipiConfig = KIPI::PluginLoader::instance()->configWidget(panel);
        d->kipiConfig->setWhatsThis(i18n("A list of available Kipi plugins appears below."));
    }

    layout->addWidget(d->pluginsNumber);
    layout->addWidget(d->kipiConfig);
    layout->setMargin(KDialog::spacingHint());
    layout->setSpacing(KDialog::spacingHint());

    if (KIPI::PluginLoader::instance())
    {
        KIPI::PluginLoader::PluginList list = KIPI::PluginLoader::instance()->pluginList();
        initPlugins((int)list.count());
    }

    // --------------------------------------------------------

    setAutoFillBackground(false);
    viewport()->setAutoFillBackground(false);
    panel->setAutoFillBackground(false);
}
开发者ID:UIKit0,项目名称:digikam,代码行数:33,代码来源:setupplugins.cpp


示例6: QScrollArea

SortableView::SortableView(const QString &mimeType, QWidget *parent)
	: QScrollArea(parent)
	, m_children()
	, m_layoutWidget(this)
	, m_layout(&m_layoutWidget) // Scroll area child widget
	, m_mimeType(mimeType)
	, m_indicator(this)
	, m_scrollTimer(this)
	, m_scrollDelta(0)
	, m_curLevel(0)
	, m_curMousePos(0, 0)
{
	// Display the layout widget in the scroll area
	setWidget(&m_layoutWidget);

	// Remove layout margin and spacing
	m_layout.setMargin(0);
	m_layout.setSpacing(0);

	// Add stretch item at the end of the list
	m_layout.addStretch();

	// Allow the scroll area to resize the layout widget dynamically
	setWidgetResizable(true);

	// Hide the indicator widget
	m_indicator.hide();

	// This widget can accept drag-and-drop items
	setAcceptDrops(true);

	// Connect timer signals
	connect(&m_scrollTimer, &QTimer::timeout,
		this, &SortableView::scrollTimeout);
}
开发者ID:andrejsavikin,项目名称:mishira,代码行数:35,代码来源:sortableview.cpp


示例7: SidePanel

TracksPanel::TracksPanel(QWidget *parent) :
    SidePanel("Tracks", parent),
    d(new TracksPanelPrivate(this)) {

    d->tracks_bus = new TracksBus;
    d->tracks_list = new QWidget;

    auto layout0 = new QVBoxLayout;
    layout0->setMargin(0);
    layout0->setSpacing(0);
    for(int i = 0; i < 16; ++i) {
        layout0->addWidget(new TracksItem);
    }
    layout0->addStretch();
    d->tracks_list->setLayout(layout0);

    auto scroll_area = new QScrollArea;
    scroll_area->setWidgetResizable(true);
    scroll_area->setWidget(d->tracks_list);
    scroll_area->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    auto layout = new QVBoxLayout;
    layout->setMargin(0);
    layout->setSpacing(0);
    layout->addWidget(d->tracks_bus);
    layout->addWidget(scroll_area);

    this->centralWidget()->setLayout(layout);
}
开发者ID:ProjRoca,项目名称:RocaEditor,代码行数:29,代码来源:tracks_panel.cpp


示例8: QScrollArea

MessageDisplayWidget::MessageDisplayWidget(QWidget *parent) :
    QScrollArea(parent)
{
    // Scroll down on new Message
    QScrollBar* scrollbar = verticalScrollBar();
    connect(scrollbar, &QScrollBar::rangeChanged, this, &MessageDisplayWidget::moveScrollBarToBottom, Qt::UniqueConnection);

    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setWidgetResizable(true);
    setFrameShape(QFrame::NoFrame);

    QWidget *widget = new QWidget(this);
    widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
    setWidget(widget);

    mainlayout = new QVBoxLayout(widget);
    mainlayout->setSpacing(1);
    mainlayout->setContentsMargins(1,1,1,1);

    // Animation
    if(Settings::getInstance().isAnimationEnabled())
    {
        animation = new QPropertyAnimation(this, "scrollPos");
        animation->setDuration(200);
        animation->setLoopCount(1);
        mainlayout->setMargin(1);
    }
}
开发者ID:chriskonstad,项目名称:ProjectTox-Qt-GUI,代码行数:28,代码来源:messagedisplaywidget.cpp


示例9: QScrollArea

SelectedEntityPropertiesViewer::SelectedEntityPropertiesViewer( QWidget* parent )
   : QScrollArea( parent )
   , m_selectedEntityProperties( NULL )
   , m_displayedEntity( NULL )
{
   setWidgetResizable( true );
}
开发者ID:chenwenbin928,项目名称:tamy,代码行数:7,代码来源:SelectedEntityPropertiesViewer.cpp


示例10: viewport

void SoundPluginRack::update_rack() {
	
	
	spacer=NULL;
	
	if (rack_box) {
		rack_box->hide();
		delete rack_box; //all will be deleted
		viewport()->setBackgroundRole(QPalette::NoRole);
		
	}

	rack_elements.clear();
	rack_box=NULL;
	
	if (track==NULL)
		return;
	rack_box = new RackHBox(this);
	rack_box->hide();
	
	QObject::connect(rack_box,SIGNAL(new_height_signal(int)),this,SLOT(rack_height_chanegd_slot( int )));
	setWidget(rack_box);
	setWidgetResizable(true);
	
	for (int i=0;i<track->get_plugin_count();i++) {
		
		CVBox *plugin_vb = new CVBox(rack_box);
		plugin_vb->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
		
		SoundPluginUI *ui = SoundPluginUI_List::get_singleton()->create_UI( track->get_plugin( i ), plugin_vb );
		ERR_CONTINUE( ui==NULL );
		
		ui->set_property_editor_updater( property_edit_updater );
		RackElement e;
		e.plugin_ui=ui;
		
		QString preset_name=QStrify(track->get_plugin( i )->get_current_preset_name());
		
		e.top=new PluginTop(plugin_vb,preset_name,i,track->get_plugin( i )->skips_processing(),track->get_plugin_count());
		rack_elements.push_back(e);
		QObject::connect(ui,SIGNAL(property_edited_signal( Property*, double )),this,SLOT(property_edited_slot( Property*, double )));
		QObject::connect(e.top,SIGNAL(action_signal( int,int )),this,SLOT(plugin_action_signal( int,int )),Qt::QueuedConnection);
		QObject::connect(ui,SIGNAL(property_options_requested( Property* )),this,SLOT(property_options_requested( Property* )),Qt::QueuedConnection); //queue is necesary to avoid crashes
		QObject::connect(ui,SIGNAL(preset_name_changed_signal()),this,SLOT(plugin_renamed_slot())); //queue is necesary to 		
		
		
	}	
	 
	spacer = new QFrame(rack_box);
	spacer->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
	
	rack_box->layout()->setMargin(0);
	rack_box->layout()->setSpacing(0);
	rack_box->adjustSize();
	rack_box->show();
	
	
	repaint();
	update_scrollbar();
}
开发者ID:BackupTheBerlios,项目名称:reshaked-svn,代码行数:60,代码来源:sound_plugin_rack.cpp


示例11: addTab

void PropertiesDialog::addTab(QTabWidget* tabWidget, QString name, IntListIter begin, IntListIter end)
{
	auto scrollArea = new QScrollArea;
	scrollArea->setFrameStyle(QFrame::NoFrame);
	auto scrollWidget = new QWidget;
	auto scrollLayout = new QVBoxLayout;
	scrollWidget->setLayout(scrollLayout);
	scrollLayout->setContentsMargins(0, 0, 0, 0);
	scrollArea->setWidget(scrollWidget);
	scrollArea->setWidgetResizable(true);

	for(auto it = begin; it != end; ++it)
	{
		auto& prop = m_propertyWidgets[*it];
		auto groupBox = new QGroupBox;
		auto layout = new QVBoxLayout;
		layout->setContentsMargins(5, 5, 5, 5);
		groupBox->setLayout(layout);
		QString title = QString::fromStdString(prop.property->name());
		groupBox->setTitle(title);
		groupBox->setToolTip(QString::fromStdString(prop.property->help()));
		layout->addWidget(prop.widget->createWidgets());
		scrollLayout->addWidget(groupBox);

		prop.groupBox = groupBox;
		prop.title = title;
	}

	scrollLayout->addStretch(1);

	tabWidget->addTab(scrollArea, name);
}
开发者ID:cguebert,项目名称:SofaViewer,代码行数:32,代码来源:PropertiesDialog.cpp


示例12: QScrollArea

VerticalScrollArea::VerticalScrollArea(QWidget *parent) :
    QScrollArea(parent)
{
    setWidgetResizable(true);
    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
}
开发者ID:adamnovak,项目名称:Bandage,代码行数:7,代码来源:verticalscrollarea.cpp


示例13: QScrollArea

KNPreferenceCategoryList::KNPreferenceCategoryList(QWidget *parent) :
    QScrollArea(parent)
{
    //Set properties.
    setContentsMargins(0,0,0,0);
    setWidgetResizable(true);
    setFrameShape(QFrame::NoFrame);

    //Set background transparent.
    QPalette pal=palette();
    pal.setColor(QPalette::Base, QColor(0,0,0,0));
    pal.setColor(QPalette::Window, QColor(0,0,0,0));
    setPalette(pal);

    //Initial container.
    QWidget *contentsContainer=new QWidget(this);
    contentsContainer->setContentsMargins(0,0,0,0);
    setWidget(contentsContainer);

    //Set main layout.
    m_mainLayout=new QBoxLayout(QBoxLayout::TopToBottom, this);
    m_mainLayout->setContentsMargins(0,5,0,5);
    m_mainLayout->setSpacing(0);
    contentsContainer->setLayout(m_mainLayout);

    //Initial the signal mapper.
    m_buttonMapper=new QSignalMapper(this);
    connect(m_buttonMapper, SIGNAL(mapped(int)),
            this, SLOT(setCurrentIndex(int)));

    m_mainLayout->addStretch();
}
开发者ID:AG3,项目名称:Mu,代码行数:32,代码来源:knpreferencecategorylist.cpp


示例14: QScrollArea

ScrollingWidget::ScrollingWidget(QWidget *parent)
    : QScrollArea(parent),
      _direction(true)
{
    _timer = new QTimer(this);

    QWidget *widget = new QWidget(this);
    _label = new QLabel(widget);
    QHBoxLayout *layout = new QHBoxLayout;
    layout->setContentsMargins(4,0,4,0);
    layout->setSpacing(10);
    layout->addWidget(_label);
    layout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Fixed));
    widget->setLayout(layout);

    setWidget(widget);
    setWidgetResizable(true);
    setMaximumHeight(35);
    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    connect(_label, SIGNAL(linkActivated(QString)), this, SIGNAL(open(QString)));
    connect(_timer, SIGNAL(timeout()), this, SLOT(scroll()));

    _timer->start(50);
}
开发者ID:HoTaeWang,项目名称:tano,代码行数:26,代码来源:ScrollingWidget.cpp


示例15: QScrollArea

PartSpecificationsWidget::PartSpecificationsWidget(QList<QWidget*> widgets, QWidget *parent)
	: QScrollArea(parent)
{
	m_scrollContent = new QFrame(this);
	m_scrollContent->setObjectName("scroll");
	//m_scrollContent->setSizePolicy(QSizePolicy::M,QSizePolicy::Expanding);

	QGridLayout *layout = new QGridLayout(m_scrollContent);
	for(int i=0; i < widgets.size(); i++) {
		//widgets[i]->setFrameStyle(QFrame::StyledPanel | QFrame::Raised);
		widgets[i]->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
		layout->addWidget(widgets[i],i,0);
		if(widgets[i]->metaObject()->indexOfSignal(QMetaObject::normalizedSignature("editionStarted()")) > -1) {
			connect(widgets[i],SIGNAL(editionStarted()),this,SLOT(updateLayout()));
		}
		if(widgets[i]->metaObject()->indexOfSignal(QMetaObject::normalizedSignature("editionFinished()")) > -1) {
			connect(widgets[i],SIGNAL(editionFinished()),this,SLOT(updateLayout()));
		}
	}
	layout->setMargin(0);
	layout->setSpacing(10);

	setWidget(m_scrollContent);
	setMinimumWidth(m_scrollContent->width()+15); //scrollbar
	setWidgetResizable(true);

	QGridLayout *mylayout = new QGridLayout(this);
	mylayout->setMargin(0);
	mylayout->setSpacing(0);

	//resize(sizeHint());
}
开发者ID:himanshuchoudhary,项目名称:cscope,代码行数:32,代码来源:partspecificationswidget.cpp


示例16: LegendView

    LegendView(QWidget *parent):
        QScrollArea(parent)
    {
        contentsWidget = new QWidget(this);

        setWidget(contentsWidget);
        setWidgetResizable(false);
    }
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:8,代码来源:qwt_legend.cpp


示例17: QScrollArea

ContextualView::ContextualView(QWidget *parent) :
        QScrollArea(parent) {
    setPalette(parent->palette());
    scrollingContextualView = new ScrollingContextualView(this);
    setFrameShape(QFrame::NoFrame);
    setWidgetResizable(true);
    setWidget(scrollingContextualView);
}
开发者ID:PhillipMwaniki,项目名称:musique,代码行数:8,代码来源:contextualview.cpp


示例18: QScrollArea

/** StackedWidgetHome **/
StackedWidgetHome::StackedWidgetHome(QWidget *parent) :
	QScrollArea(parent)
{
	setWidgetResizable(true);
	setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
	connect(&Settings::getInstance(), &Settings::homeLayoutChanged, this, &StackedWidgetHome::setHomeLayout);
	setHomeLayout(Settings::getInstance().homeLayout());
}
开发者ID:Daimanu06,项目名称:QuantiC,代码行数:9,代码来源:stackedwidget.cpp


示例19: QScrollArea

///////////////////////
// ScrollArea
//////////////////////
NCPreviewScrollArea::NCPreviewScrollArea( NCPreview * parent ) : QScrollArea( parent )
{
	setBackgroundRole(QPalette::Dark);
	//setAlignment( Qt::AlignCenter );
	setWidgetResizable( false );
	pvForm = parent;
	//setViewportMargins ( 20, 20, 20, 20 );
}
开发者ID:bagonzalez,项目名称:ncreport,代码行数:11,代码来源:ncpreview.cpp


示例20: CABSLBehaviorScrollingWidget

  CABSLBehaviorScrollingWidget(CABSLBehaviorView& cabslBehaviorView)
  {
    setFrameStyle(QFrame::NoFrame);
    setWidgetResizable(true);

    cabslBehaviorWidget = new CABSLBehaviorWidget(cabslBehaviorView, this);
    setWidget(cabslBehaviorWidget);
    setFocusProxy(cabslBehaviorWidget);
  }
开发者ID:chenzhongde,项目名称:BHumanCodeRelease,代码行数:9,代码来源:CABSLBehaviorView.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setWidth函数代码示例发布时间:2022-05-30
下一篇:
C++ setWeight函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap