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


C++ QRadioButton::resize方法代码示例

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


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

示例1: egx_radiobutton_create_

egx_wnd_t egx_radiobutton_create_(int res_id,char *name,egx_uint32_t style,int x,int y,int width,int height,egx_wnd_t parent,egx_wnd_t radiogroup)
{
	QRadioButton *button = new QRadioButton((QWidget*)(parent));
	button->setText(QString::fromLocal8Bit(name));
	if(x == 0 || y == 0){
		button->resize(width,height);
	}else{
		button->setGeometry(x,y,width,height);
	}
	QButtonGroup *_radiogroup = (QButtonGroup*)radiogroup;
	if(_radiogroup){
		_radiogroup->addButton(button);
	}
	return HWND_TO_GUIWND(button);
}
开发者ID:edgarliu,项目名称:easygx,代码行数:15,代码来源:easygx_control_.cpp

示例2: pos

MeasuringReceiver::MeasuringReceiver(Device *devicePtr,
                                     double initialCenter,
                                     QWidget *parent) :
    QDialog(parent),
    device(devicePtr),
    running(true),
    reinitialize(true),
    recalibrate(true)
{
    setWindowTitle("Measuring Receiver");
    setObjectName("SH_Page");
    setFixedWidth(400);

    QPoint pos(0, 0); // For positioning widgets

    Label *title = new Label("Synchronous Level Detector", this);
    title->move(QPoint(5, pos.y()));
    title->resize(width(), WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT+5);
    freqEntry = new FrequencyEntry("Center Freq", initialCenter, this);
    freqEntry->move(pos);
    freqEntry->resize(width() * 0.75, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT+5);

    Label *ampRangeLabel = new Label("Amplitude Range", this);
    ampRangeLabel->move(QPoint(5, pos.y()));
    ampRangeLabel->resize(width(), WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    ampGroup = new QButtonGroup(this);
    QRadioButton *highAmp = new QRadioButton("High Power Range", this),
            *midAmp = new QRadioButton("Mid Power Range", this),
            *lowAmp = new QRadioButton("Low Power Range", this);

    highAmp->move(pos);
    highAmp->resize(width()/2, WIDGET_HEIGHT);
    highAmp->setObjectName("SHPrefRadioButton");
    highAmp->setChecked(true);
    ampGroup->addButton(highAmp, MeasRcvrRangeHigh);

    highLabel = new Label("", this);
    highLabel->move(QPoint(width()/2, pos.y()));
    highLabel->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    midAmp->move(pos);
    midAmp->resize(width()/2, WIDGET_HEIGHT);
    midAmp->setObjectName("SHPrefRadioButton");
    ampGroup->addButton(midAmp, MeasRcvrRangeMid);

    midLabel = new Label("", this);
    midLabel->move(QPoint(width()/2, pos.y()));
    midLabel->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    lowAmp->move(pos);
    lowAmp->resize(width()/2, WIDGET_HEIGHT);
    lowAmp->setObjectName("SHPrefRadioButton");
    ampGroup->addButton(lowAmp, MeasRcvrRangeLow);

    lowLabel = new Label("", this);
    lowLabel->move(QPoint(width()/2, pos.y()));
    lowLabel->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT+5);

    Label *centerLabel = new Label("RF Frequency", this);
    centerLabel->move(QPoint(5, pos.y()));
    centerLabel->resize(width()/2, WIDGET_HEIGHT);
    centerReadout = new Label("915.11002 MHz", this);
    centerReadout->move(QPoint(width()/2 + 5, pos.y()));
    centerReadout->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    Label *powerLabel = new Label("RF Power", this);
    powerLabel->move(QPoint(5, pos.y()));
    powerLabel->resize(width()/2, WIDGET_HEIGHT);
    powerReadout = new Label("-32.22 dBm", this);
    powerReadout->move(QPoint(width()/2 + 5, pos.y()));
    powerReadout->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    Label *relativeLabel = new Label("Relative Power", this);
    relativeLabel->move(QPoint(5, pos.y()));
    relativeLabel->resize(width()/2, WIDGET_HEIGHT);
    relativeReadout = new Label("-5.002 dB", this);
    relativeReadout->move(QPoint(width()/2 + 5, pos.y()));
    relativeReadout->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    Label *averageLabel = new Label("Average Relative Power", this);
    averageLabel->move(QPoint(5, pos.y()));
    averageLabel->resize(width()/2, WIDGET_HEIGHT);
    averageReadout = new Label("-4.998 dB", this);
    averageReadout->move(QPoint(width()/2 + 5, pos.y()));
    averageReadout->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT*1.5);

    SHPushButton *sync = new SHPushButton("Sync", this);
    sync->move(QPoint(5, pos.y()));
    sync->resize(width()/2 - 10, WIDGET_HEIGHT);
//.........这里部分代码省略.........
开发者ID:hendorog,项目名称:BBApp,代码行数:101,代码来源:measuring_receiver_dialog.cpp


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