本文整理汇总了C++中QScrollBar::setGeometry方法的典型用法代码示例。如果您正苦于以下问题:C++ QScrollBar::setGeometry方法的具体用法?C++ QScrollBar::setGeometry怎么用?C++ QScrollBar::setGeometry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QScrollBar
的用法示例。
在下文中一共展示了QScrollBar::setGeometry方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setVBarGeometry
// Scrollbar/tools layout management.
void qtractorMidiEditView::setVBarGeometry ( QScrollBar& vbar,
int x, int y, int w, int h )
{
vbar.setGeometry(x, y, w, h - w * 2);
if (m_pVzoomIn)
m_pVzoomIn->setGeometry(x, y + h - w * 2, w, w);
if (m_pVzoomOut)
m_pVzoomOut->setGeometry(x, y + h - w, w, w);
}
示例2: drawCharacters
void Scene::drawCharacters(QList<Character> characters, int z)
{
//Draw scrollbar to browse Characters if more then 5 Characters
QScrollBar *scrollcharacters = new QScrollBar(Qt::Horizontal);
if(characters.count() > max_characters_on_screen_)
{
scrollcharacters->setGeometry(0, this->height()*29/30, this->width(), this->height()/30);
scrollcharacters->setRange(0, this->width()/(max_characters_on_screen_ + 1));
addWidget(scrollcharacters);
}
else
scrollcharacters = NULL;
//Draw Characters
int position = 1;
foreach(Character p, characters)
{
drawCharacter(p, position, z, characters.count(), scrollcharacters);
position += 1;
}
示例3: resizeEvent
void LCDRange::resizeEvent( QResizeEvent * )
{
sBar->setGeometry( 0, height() - 16, width(), 16 );
lcd->resize( width(), sBar->y() - 5 );
}
示例4: setHBarGeometry
void KexiRecordNavigator::setHBarGeometry(QScrollBar & hbar, int x, int y, int w, int h)
{
hbar.setGeometry(x + width(), y, w - width(), h);
}