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

C++ setMaximumSize函数代码示例

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

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



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

示例1: QDialog

CInputdialogBrowseWaregroup::CInputdialogBrowseWaregroup(QWidget *parent) :
    QDialog(parent),
    m_ui(new Ui::CInputdialogBrowseWaregroup)
{
    m_ui->setupUi(this);
    m_pThread=NULL;
    settings(false);//load & set settings
    m_ui->treeWidget->hideColumn(2);//id column
    m_ui->treeWidget->hideColumn(3);//parent_id column
    m_ui->treeWidget->setSortingEnabled(false);
    m_ui->treeWidget->setColumnWidth(0,300);
    m_ui->treeWidget->setColumnWidth(1,300);
    //-
    setMaximumSize(width(),height());
    setMinimumSize(width(),height());
}
开发者ID:RobRoy1304,项目名称:LaVa-2,代码行数:16,代码来源:cinputdialogbrowsewaregroup.cpp


示例2: Emulator_GetScreenSize

void QScreen::createDisplay()
{
    if (m_image != 0)
    {
        delete m_image;
        m_image = 0;
    }

    int cxScreenWidth, cyScreenHeight;
    Emulator_GetScreenSize(m_mode, &cxScreenWidth, &cyScreenHeight);

    m_image = new QImage(cxScreenWidth, cyScreenHeight, QImage::Format_RGB32);

    setMinimumSize(cxScreenWidth + 8, cyScreenHeight + 8);
    setMaximumSize(cxScreenWidth + 100, cyScreenHeight + 20);
}
开发者ID:SapphireDensetsu,项目名称:bkbtl,代码行数:16,代码来源:qscreen.cpp


示例3: QDialog

ProblemDialog::ProblemDialog(ProblemInfo *problemInfo, bool isNewProblem, QWidget *parent) : QDialog(parent)
{
    logMessage("ProblemDialog::ProblemDialog()");

    m_isNewProblem = isNewProblem;
    m_problemInfo = problemInfo;

    setWindowTitle(tr("Problem properties"));

    createControls();

    load();

    setMinimumSize(sizeHint());
    setMaximumSize(sizeHint());
}
开发者ID:honzakac,项目名称:agros2d,代码行数:16,代码来源:problemdialog.cpp


示例4: newSize

void ZoneViewWidget::resizeToZoneContents()
{
    QRectF zoneRect = zone->getOptimumRect();
    qreal totalZoneHeight = zoneRect.height();
    if (zoneRect.height() > 500)
        zoneRect.setHeight(500);
    QSizeF newSize(qMax(QGraphicsWidget::layout()->effectiveSizeHint(Qt::MinimumSize, QSizeF()).width(), zoneRect.width() + scrollBar->width() + 10), zoneRect.height() + extraHeight + 10);
    setMaximumSize(newSize);
    resize(newSize);
    
    zone->setGeometry(QRectF(0, -scrollBar->value(), zoneContainer->size().width(), totalZoneHeight));
    scrollBar->setMaximum(totalZoneHeight - zoneRect.height());
    
    if (layout())
        layout()->invalidate();
}
开发者ID:Akira586,项目名称:Cockatrice,代码行数:16,代码来源:zoneviewwidget.cpp


示例5: QWidget

GuiSetBorder::GuiSetBorder(QWidget * parent, Qt::WindowFlags fl)
	: QWidget(parent, fl), buffer(75, 75)
{
	/* length of corner line */
	l = buffer.width() / 10;
	/* margin */
	m = buffer.height() / 10;

	w = buffer.width();
	h = buffer.height();

	init();

	setMinimumSize(w,h);
	setMaximumSize(w,h);
}
开发者ID:315234,项目名称:lyx-retina,代码行数:16,代码来源:GuiSetBorder.cpp


示例6: setMinimumSize

MinimizeButton::MinimizeButton(QWidget *parent)
	:QPushButton(parent)
{
	setMinimumSize(25, 25);
	setMaximumSize(25, 25);

	setStyleSheet("MinimizeButton{"
		"background-image: url(:/images/minimize1.png);}"
		"MinimizeButton:hover{"
		"background-image: url(:/images/minimize2.png);}"
		"MinimizeButton:pressed{"
		"background-image: url(:/images/minimize2.png);}"
		);
	setToolTip("Minimize the window");
	setFlat(true);
}
开发者ID:madshy,项目名称:NGP,代码行数:16,代码来源:MinimizeButton.cpp


示例7: setUnifiedTitleAndToolBarOnMac

void UIYabause::fullscreenRequested( bool f )
{
	if ( isFullScreen() && !f )
	{
#ifdef USE_UNIFIED_TITLE_TOOLBAR
		setUnifiedTitleAndToolBarOnMac( true );
#endif
		toggleFullscreen(0, 0, false, -1 );
		showNormal();

		VolatileSettings* vs = QtYabause::volatileSettings();
		int menubarHide = vs->value( "View/Menubar" ).toInt();
		if ( menubarHide == BD_HIDEFS ||
			  menubarHide == BD_SHOWONFSHOVER)
			menubar->show();
		if ( vs->value( "View/Toolbar" ).toInt() == BD_HIDEFS )
			toolBar->show();

		setCursor(Qt::ArrowCursor);
		hideMouseTimer->stop();
	}
	else if ( !isFullScreen() && f )
	{
#ifdef USE_UNIFIED_TITLE_TOOLBAR
		setUnifiedTitleAndToolBarOnMac( false );
#endif
		VolatileSettings* vs = QtYabause::volatileSettings();

		setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
		setMinimumSize( 0,0 );

		toggleFullscreen(vs->value("Video/FullscreenWidth").toInt(), vs->value("Video/FullscreenHeight").toInt(), 
						f, vs->value("Video/VideoFormat").toInt());

		showFullScreen();

		if ( vs->value( "View/Menubar" ).toInt() == BD_HIDEFS )
			menubar->hide();
		if ( vs->value( "View/Toolbar" ).toInt() == BD_HIDEFS )
			toolBar->hide();

		hideMouseTimer->start(3 * 1000);
	}
	if ( aViewFullscreen->isChecked() != f )
		aViewFullscreen->setChecked( f );
	aViewFullscreen->setIcon( QIcon( f ? ":/actions/no_fullscreen.png" : ":/actions/fullscreen.png" ) );
}
开发者ID:SaracenOne,项目名称:yabause,代码行数:47,代码来源:UIYabause.cpp


示例8: QWidget

MainWindow::MainWindow(QWidget *parent)
    : QWidget(parent, Qt::FramelessWindowHint |
                      Qt::WindowSystemMenuHint |
                      Qt::WindowStaysOnTopHint),
      dragPosition(),
      worker_thread_(NULL),
      gui_update_thread_(this),
      logo_rotation_timer(NULL)
{
    setWindowTitle("Loudness Drop");

    setMinimumSize(130, 130);
    setMaximumSize(0, 0);
    setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);

    QAction *quitAction = new QAction(tr("E&xit"), this);
    quitAction->setShortcut(tr("Ctrl+Q"));
    connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
    addAction(quitAction);

    setContextMenuPolicy(Qt::ActionsContextMenu);

    QVBoxLayout *layout = new QVBoxLayout;
    layout->setMargin(0);
    layout->setSpacing(0);
    render_area_ = new RenderArea;
    progress_bar_ = new QProgressBar;
    progress_bar_->setFixedHeight(15);
    progress_bar_->setMaximum(130);
    progress_bar_->setTextVisible(false);

    layout->addWidget(render_area_);
    layout->addWidget(progress_bar_);
    setLayout(layout);

    setAcceptDrops(true);

    connect(&gui_update_thread_, SIGNAL(setProgressBar(int)),
            this, SLOT(setProgressBar(int)));
    connect(&gui_update_thread_, SIGNAL(rotateLogo()),
            this, SLOT(rotateLogo()));
    connect(&gui_update_thread_, SIGNAL(resetLogo()),
            this, SLOT(resetLogo()));
    connect(this, SIGNAL(stopGUIThread()),
            &gui_update_thread_, SLOT(stopThread()));
    gui_update_thread_.start();
}
开发者ID:DIT-Tools,项目名称:libebur128,代码行数:47,代码来源:scanner-drop-qt.cpp


示例9: Q3CanvasView

/**
 * MIPSarch contructor.
 * Creates and sets the MIPSarchcanvas to be displayed, and some
 * GUI functionalities.
 */
MIPSarch::MIPSarch( mips &m, QWidget* parent,  const char* name, Qt::WFlags fl )
    : Q3CanvasView(0, parent, name, fl )
{   
    archCanvas=new MIPSarchCanvas(m,this);
    setCanvas(archCanvas);

    setIcon(QPixmap("mips.xpm"));

    resize(QSize(896+5,455+5));
    setMaximumSize(QSize(896+5,455+5));

    cursor=new QCursor(Qt::PointingHandCursor);
    setCursor(*cursor);

    viewport()->setMouseTracking(true);
    setFocusPolicy(Qt::StrongFocus);
}
开发者ID:rafaelferreirapt,项目名称:acomputadoresavancada,代码行数:22,代码来源:MIPSarch.cpp


示例10: QDialog

Ui::Dialog_About::Dialog_About(QWidget *parent): QDialog(parent) {
	setObjectName("Dialog_About");
	setWindowTitle("About");
	resize(380, 312);
	setMaximumSize(380, 312);
	setMinimumSize(380, 312);
	QIcon aboutIcon(":/img/bp-nfoview.png");
	setWindowIcon(aboutIcon);

	ilabel = new QLabel(this);
	ilabel->setGeometry(5,5,370,64);
	ilabel->setPixmap(QPixmap(":/img/bp-nfoview.png").scaled(64,64,Qt::KeepAspectRatio));
	ilabel->setAlignment(Qt::AlignCenter);

	buttonBox = new QDialogButtonBox(this);
	buttonBox->setGeometry(QRect(5, 280, 370, 32));
	buttonBox->setOrientation(Qt::Horizontal);
	buttonBox->setStandardButtons(QDialogButtonBox::Close);
	buttonBox->setCenterButtons(true);
	buttonBox->setObjectName("buttonBox");

	label = new QLabel(this);
	label->setGeometry(QRect(5, 64, 370, 220));
	label->setAlignment(Qt::AlignCenter);
	label->setWordWrap(true);
	label->setOpenExternalLinks(true);
	label->setObjectName("label");

	QString aboutText("<span style=\"font-size:16pt;\"><b>bp-nfoview ");
	aboutText += MAIN_VERSION;
	aboutText += "</b></span><br>A simple lightweight nfo-viewer written in C++ using Qt4 for its interface<br>";

	aboutText += "<br>\nits also using:\n";
	aboutText += "<br>Codepage437Codec ";
	aboutText += QCODEPAGE437CODEC_VERSION;

	aboutText += "<br>AboutDialog ";
	aboutText += DIALOG_ABOUT_VERSION;

	aboutText += "<br><br>Copyright (c) 2010-2013 &lt;[email protected]&gt; <br>licensed under GPL-3<br> See <a href=\"http://www.gnu.org/licenses/gpl.html\">http://www.gnu.org/licenses/</a> for more info";
	label->setText(aboutText);

	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
	QMetaObject::connectSlotsByName(this);
}
开发者ID:fhede,项目名称:bp-nfoview,代码行数:46,代码来源:dialog_about.cpp


示例11: QPushButton

RunButton::RunButton(TestItem * item, QWidget * parent) :
    QPushButton(parent),
    item_(item)
{
    // Set style
    setMinimumSize(16, 16);
    setMaximumSize(16, 16);
    setIcon(QIcon(":/runicon.png"));
    setFlat(true);
    setStyleSheet(runButtonStyleSheet);

    // Prevent keyboard focus (so the focus is always on the TreeView
    setFocusPolicy(Qt::NoFocus);

    // Run test when clicked
    connect(this, &RunButton::clicked, this, &RunButton::onClicked_);
}
开发者ID:dalboris,项目名称:QtProjectTemplate,代码行数:17,代码来源:RunButton.cpp


示例12: QDialog

WageDialog::WageDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::WageDialog)
{
    ui->setupUi(this);
    ui->setupUi(this);
    this->setWindowTitle("工资查询");       //设置标题
    QIcon icon = QIcon(":/image/manage.ico");//注意修改这里的图片目录
    setWindowIcon(icon);

    setMaximumSize(490,360);
    setMinimumSize(490,360);

    setWindowFlags(Qt::CustomizeWindowHint|Qt::WindowCloseButtonHint);//去掉窗口上的问号

    QObject::connect(ui->ReturnButton,SIGNAL(clicked()),this,SLOT(ReturnSlot()));       //返回信号与槽
}
开发者ID:LiuRuoQian,项目名称:APPprojectDesign,代码行数:17,代码来源:wagedialog.cpp


示例13: Inherited

SearchDialogMainWidgetData::SearchDialogMainWidgetData
(
	QWidget* parent,
	const char* name
)
	:
	Inherited( parent, name, 0 )
{
	comboSelector = new QComboBox( FALSE, this, "ComboBoxSelector" );
	comboSelector->setGeometry( 0, 0, 250, 33 );
	comboSelector->setMinimumSize( 10, 10 );
	comboSelector->setMaximumSize( 32767, 32767 );
	comboSelector->setSizeLimit( 10 );
	comboSelector->setAutoResize( FALSE );

	labelMatches = new QLabel( this, "LabelMatches" );
	labelMatches->setGeometry( 0, 33, 250, 23 );
	labelMatches->setMinimumSize( 10, 10 );
	labelMatches->setMaximumSize( 32767, 32767 );
	labelMatches->setText( "matches" );
	labelMatches->setAlignment( 292 );
	labelMatches->setMargin( -1 );

	lePattern = new QLineEdit( this, "LineEditPattern" );
	lePattern->setGeometry( 0, 56, 250, 24 );
	lePattern->setMinimumSize( 10, 10 );
	lePattern->setMaximumSize( 32767, 32767 );
	lePattern->setText( "*" );
	lePattern->setMaxLength( 32767 );
	lePattern->setEchoMode( QLineEdit::Normal );
	lePattern->setFrame( TRUE );

	QBoxLayout* dlgedit_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 0, 0, 0L );
	dlgedit_layout_1->addStrut( 0 );
	QBoxLayout* dlgedit_layout_1_1 = new QBoxLayout( QBoxLayout::TopToBottom, 0, 0L );
	dlgedit_layout_1->addLayout( dlgedit_layout_1_1, 1 );
	dlgedit_layout_1_1->addStrut( 0 );
	dlgedit_layout_1_1->addWidget( comboSelector, 5, 36 );
	dlgedit_layout_1_1->addWidget( labelMatches, 3, 36 );
	dlgedit_layout_1_1->addWidget( lePattern, 3, 36 );


	resize( 250,80 );
	setMinimumSize( 0, 0 );
	setMaximumSize( 32767, 32767 );
}
开发者ID:kthxbyte,项目名称:KDE1-Linaro,代码行数:46,代码来源:SearchDialogMainWidgetData.cpp


示例14: QWidget

GameWidget::GameWidget(int size_of_field, int cell_size, QWidget* widget) 
    : QWidget(widget), 
    cell_size(cell_size), field_size(size_of_field) {

    game = NULL;

    qDebug() << "game widget constructor";

    slotSetPlayerVsCPU();

    resize(size_of_field * cell_size + 1, size_of_field * cell_size + 1);
    setMinimumSize(size());
    setMaximumSize(size());

    ip = "0.0.0.0";
    port = 8080;
}
开发者ID:akulinich,项目名称:tic-tac-toe,代码行数:17,代码来源:game_widget.cpp


示例15: QPushButton

TCircleButton::TCircleButton(int diameter, bool animate, QWidget *parent) : QPushButton(parent), m_diameter(diameter)
{
    show();

    m_pix = QPixmap(new_xpm);
    
    setIcon(m_pix);
    
    paintMask();
    
    setMaximumSize(m_diameter, m_diameter);
    
    m_animator = new Animator;
    
    if (animate)
        connect(m_animator->aTimer, SIGNAL(timeout()), this, SLOT(animate()));
}
开发者ID:nanox,项目名称:tupi,代码行数:17,代码来源:tcirclebutton.cpp


示例16: constWidthDock

squareToolDock::squareToolDock(QWidget* parent)
  : constWidthDock(parent), detailDock_(NULL) {

  dockLayout_ = new QVBoxLayout(this);
  setLayout(dockLayout_);

  toolLayout_ = new QGridLayout();

  // toolLayout_ uses smaller icons by default
  // apparently every button has to be set individually...
  const int iconDimension = style()->pixelMetric(QStyle::PM_ToolBarIconSize);
  const QSize iconSize(iconDimension, iconDimension);
  constructTools(iconSize);

  toolColorLabel_ = new mousePressLabel(this);
  toolColorLabel_->setFixedSize(swatchSize());
  toolColorLabel_->setFrameStyle(QFrame::Panel | QFrame::Raised);
  toolColorLabel_->setLineWidth(3);
  toolColorLabel_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
  toolColorLabel_->setAlignment(Qt::AlignCenter);
  QPixmap qpm = QPixmap(swatchSize());
  qpm.fill(Qt::black);
  toolColorLabel_->setPixmap(qpm);
  toolColorLabel_->setEnabled(false);
  connect(toolColorLabel_, SIGNAL(mousePressed()),
          this, SLOT(processToolLabelMousePressed()));

  toolLabelLayout_ = new QHBoxLayout();
  dockLayout_->addLayout(toolLabelLayout_);
  toolLabelLayout_->addWidget(toolColorLabel_);

  dockLayout_->addLayout(toolLayout_);

  flossTypeBox_ = new QComboBox(this);
  connect(flossTypeBox_, SIGNAL(currentIndexChanged(int )),
          this, SLOT(processFlossTypeBoxChange(int )));
  const QList<flossType> types = flossType::flossTypes();
  for (int i = 0, size = types.size(); i < size; ++i) {
    flossTypeBox_->addItem(types[i].text(),
                           QVariant::fromValue(types[i]));
  }
  dockLayout_->addWidget(flossTypeBox_);

  setMinimumSize(sizeHint());
  setMaximumSize(sizeHint());
}
开发者ID:craftoid,项目名称:Cstitch,代码行数:46,代码来源:squareToolDock.cpp


示例17: QWidget

ColorWheel::ColorWheel(QWidget* parent) :
    QWidget(parent),
    initSize_(200,200),
    mouseDown_(false),
    margin_(0),
    wheelWidth_(30),
    currentColor_(Qt::red),
    inWheel_(false),
    inSquare_(false) {
    
    currentColor_ = currentColor_.toHsv();
    updateSquareImage(currentColor_.hue());

    setMinimumSize(initSize_);
    setMaximumSize(initSize_);
    setCursor(Qt::CrossCursor);
}
开发者ID:sarbi127,项目名称:inviwo,代码行数:17,代码来源:colorwheel.cpp


示例18: QFrame

MoveWidget::MoveWidget(QWidget *parent)
    : QFrame(parent, Qt::FramelessWindowHint|Qt::Tool|Qt::X11BypassWindowManagerHint), m_move(false)
{

    Q_ASSERT(parent);
    parent->installEventFilter(this);
    setCursor(Qt::SizeAllCursor);

    setMaximumSize(50, 30);
    setMinimumSize(maximumSize());

    setMouseTracking(true);
    setFrameStyle(QFrame::Panel|QFrame::Plain);

    setVisible(parentWidget()->isVisible());

}
开发者ID:houzhenggang,项目名称:recorditnow,代码行数:17,代码来源:movewidget.cpp


示例19: QSlider

/**
 * @brief TextBubbleSlider::TextBubbleSlider Constructs a text-bubble slider that copys
 * all relevant data from the previous slider
 * @param copySlider
 * @param parent
 */
TextBubbleSlider::TextBubbleSlider(QSlider *copySlider, QWidget *parent) :
    QSlider(parent)
{
    construct();

    hidden = false;

    // Copy settings
    setSizePolicy(copySlider->sizePolicy());
    setMinimumSize(copySlider->minimumSize());
    setMaximumSize(copySlider->maximumSize());
    setFocusPolicy(copySlider->focusPolicy());
    setOrientation(copySlider->orientation());
    setMaximum(copySlider->maximum());
    setMinimum(copySlider->minimum());
    setToolTip(copySlider->toolTip());
}
开发者ID:EvalZero,项目名称:TauLabs,代码行数:23,代码来源:textbubbleslider.cpp


示例20: BaseDialog

SearchDialog::SearchDialog(QWidget * parent) : BaseDialog(parent), ui(new Ui::SearchDialog) {
    ui -> setupUi(this);

    QGridLayout * newLayout = new QGridLayout(this);
    QLabel * err_output = new QLabel(this);

    configurator = new Controls::SearchConfigurator(this, ui -> acceptButton, err_output);

    newLayout -> addWidget(err_output, 0, 0, 1, 2);
    newLayout -> addWidget(configurator, 1, 0, 1, 2);
    newLayout -> addWidget(ui -> cancelButton, 2, 0);
    newLayout -> addWidget(ui -> acceptButton, 2, 1);
    setLayout(newLayout);

    setMinimumSize(480, 480);
    setMaximumSize(480, 480);
}
开发者ID:jeyboy,项目名称:playo3,代码行数:17,代码来源:search_dialog.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ setMaximumWidth函数代码示例发布时间:2022-05-30
下一篇:
C++ setMatrix函数代码示例发布时间: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