本文整理汇总了C++中QTreeView::setColumnWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ QTreeView::setColumnWidth方法的具体用法?C++ QTreeView::setColumnWidth怎么用?C++ QTreeView::setColumnWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QTreeView
的用法示例。
在下文中一共展示了QTreeView::setColumnWidth方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDirModel
QTreeView *StManagerStudyListComp::createDirectoryTreeView ()
{
QTreeView *directoryTree = new QTreeView;
QDirModel *model = new QDirModel();
model->setFilter( QDir::Dirs | QDir::NoDotAndDotDot | QDir::Drives );
directoryTree->setModel( model );
directoryTree->setColumnWidth( 0, 150 );
// hide size and type in filesystem tree view
directoryTree->setColumnHidden( 1, true );
directoryTree->setColumnHidden( 2, true );
return directoryTree;
}
示例2: AbstractTool
RecorderTool::RecorderTool(QWidget * parent) :
AbstractTool(parent)
{
QHBoxLayout * layout = new QHBoxLayout(this);
// Model view
QTreeView * view = new QTreeView(this);
// TODO view->setModel(&m_model);
layout->addWidget(view);
view->setMaximumWidth(300);
view->setColumnWidth(0, 210);
setLayout(layout);
setMinimumSize(650, 400);
}
示例3: QWidget
ParametersFromFilesTool::ParametersFromFilesTool(QWidget * parent) :
QWidget(parent), m_operation(NULL)
{
QHBoxLayout * layout = new QHBoxLayout(this);
// Model view
QTreeView * view = new QTreeView(this);
view->setModel(&m_model);
layout->addWidget(view);
view->setMaximumWidth(300);
view->setColumnWidth(0, 210);
// Files
m_group = new qt::SortableGroup(this);
m_group->setDelete(false);
layout->addWidget(m_group);
setLayout(layout);
// widget signals
connect(m_group,
SIGNAL(deleteRequested(corbasim::qt::SortableGroupItem *)),
this,
SLOT(deleteRequested(corbasim::qt::SortableGroupItem *)));
// connect model signals
connect(&m_model,
SIGNAL(checked(
OperationDescriptor_ptr,
const QList< int >&)),
this,
SLOT(createFilesItem(
OperationDescriptor_ptr,
const QList< int >&)));
connect(&m_model,
SIGNAL(unchecked(
OperationDescriptor_ptr,
const QList< int >&)),
this,
SLOT(deleteFilesItem(
OperationDescriptor_ptr,
const QList< int >&)));
setMinimumSize(450, 300);
}
示例4: setColumnWidth
int TreeView::setColumnWidth(lua_State * L) // ( int column, int width )
{
QTreeView* obj = QtObject<QTreeView>::check( L, 1);
obj->setColumnWidth( Util::toInt( L, 2 ), Util::toInt( L, 3 ) );
return 0;
}