本文整理汇总了C++中QSplitter::geometry方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplitter::geometry方法的具体用法?C++ QSplitter::geometry怎么用?C++ QSplitter::geometry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSplitter
的用法示例。
在下文中一共展示了QSplitter::geometry方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setVisibility
void PropertiesWidget::setVisibility(bool visible)
{
if (!visible && (state == VISIBLE)) {
QSplitter *hSplitter = static_cast<QSplitter *>(parentWidget());
m_ui->stackedProperties->setVisible(false);
slideSizes = hSplitter->sizes();
hSplitter->handle(1)->setVisible(false);
hSplitter->handle(1)->setDisabled(true);
QList<int> sizes = QList<int>() << hSplitter->geometry().height() - 30 << 30;
hSplitter->setSizes(sizes);
state = REDUCED;
return;
}
if (visible && (state == REDUCED)) {
m_ui->stackedProperties->setVisible(true);
QSplitter *hSplitter = static_cast<QSplitter *>(parentWidget());
hSplitter->handle(1)->setDisabled(false);
hSplitter->handle(1)->setVisible(true);
hSplitter->setSizes(slideSizes);
state = VISIBLE;
// Force refresh
loadDynamicData();
}
}
示例2: expandTabs
void GTUtilsWorkflowDesigner::expandTabs(HI::GUITestOpStatus &os){
QSplitter* splitter = qobject_cast<QSplitter*>(GTWidget::findWidget(os,"splitter"));
GT_CHECK(splitter, "splitter not found");
QList<int> s;
s = splitter->sizes();
if(s.first()==0){//expands tabs if collapsed
QPoint p;
p.setX(splitter->geometry().left()+2);
p.setY(splitter->geometry().center().y());
GTMouseDriver::moveTo(os, p);
GTGlobals::sleep(300);
GTMouseDriver::press(os);
p.setX(p.x()+200);
GTMouseDriver::moveTo(os,p);
GTMouseDriver::release(os);
}
}