本文整理汇总了C++中QStatusBar::setSizeGripEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ QStatusBar::setSizeGripEnabled方法的具体用法?C++ QStatusBar::setSizeGripEnabled怎么用?C++ QStatusBar::setSizeGripEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QStatusBar
的用法示例。
在下文中一共展示了QStatusBar::setSizeGripEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: file
MainWindow::MainWindow( IfcPlusPlusSystem* sys, ViewerWidget* vw, QWidget *parent) : m_system(sys), m_viewer_widget(vw), QMainWindow(parent)
{
m_system = sys;
setWindowTitle("IFC++ example application");
setWindowIcon( QIcon( ":img/IfcPlusPlusViewerWindowIcon.png" ) );
// global style sheet definitions
QFile file( ":styles.css" );
file.open( QFile::ReadOnly );
QString styleSheet = QLatin1String( file.readAll() );
setStyleSheet( styleSheet );
createTabWidget();
QAction* zoom_bounds_btn = new QAction(QIcon(":img/zoomBoundings.png"), "&Zoom to boundings", this );
zoom_bounds_btn->setShortcut(tr("Ctrl+Z"));
zoom_bounds_btn->setStatusTip("Zoom to boundings");
connect(zoom_bounds_btn, SIGNAL(triggered()), this, SLOT(slotBtnZoomBoundingsClicked()));
QAction* remove_selected_objects = new QAction(QIcon(":img/RemoveSelectedObjects.png"), "&Remove selected objects [del]", this );
remove_selected_objects->setStatusTip("Remove selected objects [del]");
connect(remove_selected_objects, SIGNAL(triggered()), this, SLOT(slotBtnRemoveSelectedObjectsClicked()));
m_file_toolbar = new QToolBar();
m_file_toolbar->setObjectName("FileToolbar");
m_file_toolbar->addAction(zoom_bounds_btn);
m_file_toolbar->addAction(remove_selected_objects);
addToolBar( Qt::LeftToolBarArea, m_file_toolbar );
// building structure widget
QDockWidget *dock = new QDockWidget(tr("Project structure"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
addDockWidget(Qt::RightDockWidgetArea, dock);
IfcTreeWidget* ifc_tree_widget = new IfcTreeWidget( m_system );
dock->setWidget( ifc_tree_widget );
m_splitter = new QSplitter( Qt::Vertical );
m_splitter->setContentsMargins( 0, 0, 0, 0 );
m_splitter->addWidget( m_viewer_widget );
m_splitter->addWidget( m_tabwidget );
m_splitter->setStretchFactor( 0, 2 );
m_splitter->setStretchFactor( 1, 0 );
QList<int> splitter_sizes;
splitter_sizes << 400 << 100;
m_splitter->setSizes( splitter_sizes );
// status bar
QStatusBar* status = new QStatusBar();
m_label_status_cursor = new QLabel( "0.000, 0.000, 0.000" );
status->addWidget( m_label_status_cursor, 0 );
status->setSizeGripEnabled( true );
setStatusBar( status );
// central widget
setCentralWidget( m_splitter );
// restore geometry
QSettings settings(QSettings::UserScope, QLatin1String("IfcPlusPlus"));
QStringList keys = settings.allKeys();
if( keys.contains( "MainWindowGeometry" ) )
{
restoreGeometry(settings.value("MainWindowGeometry").toByteArray());
}
else
{
showMaximized();
}
if( keys.contains( "mainWindowState" ) )
{
restoreState(settings.value("mainWindowState").toByteArray());
}
}