本文整理汇总了C++中QStatusBar::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ QStatusBar::setVisible方法的具体用法?C++ QStatusBar::setVisible怎么用?C++ QStatusBar::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QStatusBar
的用法示例。
在下文中一共展示了QStatusBar::setVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toggledFullScreen
void MainWindow::toggledFullScreen(bool val) {
QMenuBar* pMenuBar = menuBar();
if ( pMenuBar )
pMenuBar->setVisible(!val);
QStatusBar *pStatusBar = statusBar();
if ( pStatusBar )
pStatusBar->setVisible(!val);
}
示例2: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
pSettings_(NULL),
redValue_(0),
greenValue_(0),
blueValue_(0),
pRedLabel_(NULL),
pGreenLabel_(NULL),
pBlueLabel_(NULL),
pRedValueLabel_(NULL),
pGreenValueLabel_(NULL),
pBlueValueLabel_(NULL),
pRedSlider_(NULL),
pGreenSlider_(NULL),
pBlueSlider_(NULL)
{
ui->setupUi(this);
QString settingsFilePath = QDir::homePath() + "/.colorsrc";
pSettings_ = new QSettings(settingsFilePath, QSettings::NativeFormat, this);
redValue_ = static_cast<uint8_t>(pSettings_->value(redValueKey).toInt());
greenValue_ = static_cast<uint8_t>(pSettings_->value(greenValueKey).toInt());
blueValue_ = static_cast<uint8_t>(pSettings_->value(blueValueKey).toInt());
// hides all main window normal GUI related stuff
QObjectList childObjects = children();
foreach (QObject* pChildObject, childObjects) {
QToolBar* pToolBar = qobject_cast<QToolBar*>(pChildObject);
if (pToolBar)
pToolBar->setVisible(false);
QStatusBar* pStatusBar = qobject_cast<QStatusBar*>(pChildObject);
if (pStatusBar)
pStatusBar->setVisible(false);
QMenuBar* pMenuBar = qobject_cast<QMenuBar*>(pChildObject);
if (pMenuBar)
pMenuBar->setVisible(false);
}