本文整理汇总了C++中QSplitter::setMinimumWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplitter::setMinimumWidth方法的具体用法?C++ QSplitter::setMinimumWidth怎么用?C++ QSplitter::setMinimumWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSplitter
的用法示例。
在下文中一共展示了QSplitter::setMinimumWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QMainWindow
MainWindow::MainWindow( orcaprobe::IBrowser *browser,
orcaqcm::OcmModel *model,
const std::vector<std::string> & supportedInterfaces,
QWidget *parent, Qt::WFlags flags)
: QMainWindow(parent, flags),
browser_(browser),
model_(model),
supportedInterfaces_(supportedInterfaces)
{
assert(browser_ || "null pointer to browser");
assert(model_ || "null pointer to model");
setWindowTitle("Orca: Probe");
setWindowIcon ( QPixmap(orcaqt::orca2_2x3_yellow_130_xpm) );
QFont f;
f.setPointSize( 7 );
setFont( f );
resize( qApp->desktop()->availableGeometry(0).width(), 400 );
pathLabel_ = new QLabel;
QLabel *movLabel = new QLabel;
movie_ = new QMovie(this);
movie_->setCacheMode(QMovie::CacheAll);
movie_->setFileName("/opt/orca2/images/working.mng");
movLabel->setMovie(movie_);
QHBoxLayout *labelLayout = new QHBoxLayout;
labelLayout->addWidget(pathLabel_, 0, Qt::AlignLeft );
labelLayout->addWidget(movLabel, 0, Qt::AlignRight );
QSplitter* split = new QSplitter();
split->setOrientation(Qt::Horizontal);
split->setMinimumWidth( 400 );
ProbeView::config( browser_, pathLabel_, statusBar() );
regView_ = new ProbeView( "Regisry", model_, split );
platfView_ = new ProbeView( "Platform", model_, split );
compView_ = new ProbeView( "Component", model_, split );
ifaceView_ = new ProbeView( "Interface", model_, split );
operView_ = new ProbeView( "Operation", model_, split );
split->setStretchFactor( 0, 1 );
split->setStretchFactor( 1, 1 );
split->setStretchFactor( 2, 1 );
split->setStretchFactor( 3, 1 );
split->setStretchFactor( 4, 2 );
regView_->setNeighbors( 0, platfView_ );
platfView_->setNeighbors( regView_, compView_ );
compView_->setNeighbors( platfView_, ifaceView_ );
ifaceView_->setNeighbors( compView_, operView_ );
operView_->setNeighbors( ifaceView_, 0 );
QWidget *centralWidget = new QWidget;
QVBoxLayout *layout = new QVBoxLayout;
layout->addLayout( labelLayout, 0 );
layout->addWidget( split, 1 );
centralWidget->setLayout( layout );
setCentralWidget( centralWidget );
setupMenuBar();
statusBar()->showMessage( "Initialized", 2000 );
}