本文整理汇总了C++中QMdiSubWindow::setMinimumSize方法的典型用法代码示例。如果您正苦于以下问题:C++ QMdiSubWindow::setMinimumSize方法的具体用法?C++ QMdiSubWindow::setMinimumSize怎么用?C++ QMdiSubWindow::setMinimumSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMdiSubWindow
的用法示例。
在下文中一共展示了QMdiSubWindow::setMinimumSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fileNew
void MainWindow::fileNew() {
if (_sdata)
if (!_sdata->isSaved())
maybeSave();
fileClose();
// if project exist,
// if not saved,
//maybe save?
// close
// run wizard
QMdiSubWindow * world = _mdiArea->addSubWindow(new WorldWidget());
world->setWindowTitle("*untitled");
world->setMinimumSize(300, 200);
world->show();
_sdata = new SimulationData();
_sdata->setSaved(false);
connect(_sdata, SIGNAL(fileNameChanged(QString)), world, SLOT(setWindowTitle(QString)));
SensorNetwork net(40);
net.push();
net.start();
_fileSaveAsAct->setEnabled(true);
_fileCloseAct->setEnabled(true);
}
示例2: insertPlot
PlotWithCurves* Group::insertPlot()
{
QMdiSubWindow* window = new QMdiSubWindow;
{
window->setMinimumSize(250, 150);
window->setWindowIcon(QIcon(":/res/mainWindow/closeAllPlots.png"));
window->setAttribute(Qt::WA_DeleteOnClose);
}
PlotWithCurves* plot = new PlotWithCurves(samplesManager, curvesManagerView, window);
{
plot->connect(plot, SIGNAL(destroyed()), this, SLOT(retitle()));
window->setWidget(plot);
addSubWindow(window);
window->show();
retitle();
}
return plot;
}
示例3: loadOrig
void MainWindow::loadOrig(QString filename){
QImage orig;
if(!orig.load(filename)){
return;
}
fWorkImage *task = new fWorkImage(ui->mdiArea);
QMdiSubWindow *sub = ui->mdiArea->addSubWindow(task);
task->setWindowTitle(filename);
task->setPixmap(QPixmap(filename));
task->show();
sub->setMinimumSize(orig.size().width(), orig.height()+30);
active = task;
fInfo* fi = (fInfo*)info->widget();
fi->setFileName(filename);
fi->setWidth(orig.width());
fi->setHeight(orig.height());
/*
ui->tableWidget->setItem(3,0,new QTableWidgetItem(QString::fromLocal8Bit("Число цветов"))
);
ui->tableWidget->setItem(3,1,new QTableWidgetItem(QString("%1").arg(orig.colorCount()))
);
ui->tableWidget->setItem(4,0,new QTableWidgetItem(QString::fromLocal8Bit("Глубина цвета"))
);
ui->tableWidget->setItem(4,1,new QTableWidgetItem(QString("%1").arg(orig.depth()))
);
ui->tableWidget->setItem(5,0,new QTableWidgetItem(QString::fromLocal8Bit("Канал яркости"))
);
ui->tableWidget->setItem(5,1,new QTableWidgetItem(QString("%1").arg(orig.hasAlphaChannel()))
);
ui->tableWidget->setItem(6,0,new QTableWidgetItem(QString::fromLocal8Bit("Ч/Б изображение"))
);
ui->tableWidget->setItem(6,1,new QTableWidgetItem(QString("%1").arg(orig.isGrayscale()))
);
ui->tableWidget->resizeColumnsToContents();
*/
}