当前位置: 首页>>代码示例>>C++>>正文


C++ QToolButton::setMinimumWidth方法代码示例

本文整理汇总了C++中QToolButton::setMinimumWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ QToolButton::setMinimumWidth方法的具体用法?C++ QToolButton::setMinimumWidth怎么用?C++ QToolButton::setMinimumWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QToolButton的用法示例。


在下文中一共展示了QToolButton::setMinimumWidth方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: selectButton

QToolButton* AppearanceDialog::selectButton(int width, int height, QString toolTip) {
    QToolButton* button = new QToolButton(this);
    button->setToolTip(toolTip);
    button->setToolButtonStyle(Qt::ToolButtonTextOnly);
    button->setMenu(new QMenu(button));
    button->setMinimumWidth(width);
    button->setMinimumHeight(height);

    return button;
}
开发者ID:carriercomm,项目名称:frostbite,代码行数:10,代码来源:appearancedialog.cpp

示例2: createToolButton

QToolButton* MainWindow::createToolButton(QIcon buttonIcon, QString buttonName) //初始化顶部按钮
{
    QToolButton* toolButton;
    toolButton = new QToolButton(this);
    toolButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    toolButton->setIcon(buttonIcon);
    toolButton->setIconSize(QSize(50,50));
    toolButton->setText(buttonName);
    toolButton->setMinimumWidth(65);
    toolButton->setAutoRaise(true);
    return toolButton;
}
开发者ID:ClaudeZoo,项目名称:VirtualPool_Desktop,代码行数:12,代码来源:mainwindow.cpp

示例3: createWidget

	QWidget * createWidget (QWidget * pParent)
	{
		QToolButton * pToolButton = new QToolButton(pParent);
		pToolButton->setToolButtonStyle(Qt::ToolButtonTextOnly);
		pToolButton->setPopupMode(QToolButton::InstantPopup);
		pToolButton->setMinimumHeight(TOOLBAR_MIN_HEIGHT);
		pToolButton->setMinimumWidth(100);

		QMenu * pMenu = new QMenu(pToolButton);
		pMenu->addMenu(tr("Textured"));
		pMenu->addMenu(tr("Wireframe"));
		pMenu->addMenu(tr("Tex-Wir"));

		pToolButton->setMenu(pMenu);
		return pToolButton;
	}
开发者ID:chena1982,项目名称:eff,代码行数:16,代码来源:EFFEditorScenePanel.cpp

示例4: on_mui_nuevapantalla_clicked

void DistroMesas::on_mui_nuevapantalla_clicked() {
            bool ok;
        QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"),
                                             tr("Nombre Pantalla:"), QLineEdit::Normal,
                                             "", &ok);
        if (ok && !text.isEmpty())
            	m_listapantallas.append(text);
	
	QToolButton *but = new QToolButton(this);
	but->setObjectName("p_" + text);
	but->setText(text);
	but->setCheckable(TRUE);
	but->setMinimumHeight(42);
	but->setMinimumWidth(42);
	mui_espaciopantallas->addWidget(but);
	connect(but, SIGNAL(clicked()), this, SLOT(cambiarPantalla()));
    repaint();
}
开发者ID:trifolio6,项目名称:Bulmages,代码行数:18,代码来源:mesas.cpp

示例5: PFSViewException

PFSViewMainWin::PFSViewMainWin(  float window_min, float window_max ):
  QMainWindow( 0 )
{
  currentFrame = frameList.end();
  
  QScrollArea *pfsViewArea = new PFSViewWidgetArea( this );
  
  pfsView = (PFSViewWidget*)pfsViewArea->widget();
  
  setCentralWidget( pfsViewArea );

  setWindowIcon( QIcon( ":icons/appicon.png" ) );

  QAction *nextFrameAct = new QAction( tr( "&Next frame" ), this );
  nextFrameAct->setStatusTip( tr( "Load next frame" ) );
  nextFrameAct->setShortcut( Qt::Key_PageDown );
  connect( nextFrameAct, SIGNAL(triggered()), this, SLOT(gotoNextFrame()) );

  QAction *previousFrameAct = new QAction( tr( "&Previous frame" ), this );
  previousFrameAct->setStatusTip( tr( "Load previous frame" ) );
  previousFrameAct->setShortcut( Qt::Key_PageUp );
  connect( previousFrameAct, SIGNAL(triggered()), this, SLOT(gotoPreviousFrame()) );
  
  QToolBar *toolBar = addToolBar( tr( "Navigation" ) );
//  toolBar->setHorizontalStretchable( true );

  QToolButton *previousFrameBt = new QToolButton( toolBar );
  previousFrameBt->setArrowType( Qt::LeftArrow );
  previousFrameBt->setMinimumWidth( 15 );
  connect( previousFrameBt, SIGNAL(clicked()), this, SLOT(gotoPreviousFrame()) );
  previousFrameBt->setToolTip( "Goto previous frame" );
  toolBar->addWidget( previousFrameBt );
  
  QToolButton *nextFrameBt = new QToolButton( toolBar );
  nextFrameBt->setArrowType( Qt::RightArrow );
  nextFrameBt->setMinimumWidth( 15 );
  connect( nextFrameBt, SIGNAL(clicked()), this, SLOT(gotoNextFrame()) );
  nextFrameBt->setToolTip( "Goto next frame" );
  toolBar->addWidget( nextFrameBt );

  QLabel *channelSelLabel = new QLabel( "&Channel", toolBar );
  channelSelection = new QComboBox( toolBar );
  channelSelLabel->setBuddy( channelSelection );
  connect( channelSelection, SIGNAL( activated( int ) ),
    this, SLOT( setChannelSelection(int) ) );
  toolBar->addWidget( channelSelLabel );
  toolBar->addWidget( channelSelection );
  
  toolBar->addSeparator();

  QLabel *mappingMethodLabel = new QLabel( "&Mapping", toolBar );
  mappingMethodLabel->setAlignment(  Qt::AlignRight | Qt::AlignVCenter ); // | 
//				    Qt::TextExpandTabs | Qt::TextShowMnemonic );
  mappingMethodCB = new QComboBox( toolBar );
  mappingMethodLabel->setBuddy( mappingMethodCB );
  mappingMethodCB->addItem( "Linear" );
  mappingMethodCB->addItem( "Gamma 1.4" );
  mappingMethodCB->addItem( "Gamma 1.8" );
  mappingMethodCB->addItem( "Gamma 2.2" );
  mappingMethodCB->addItem( "Gamma 2.6" );
  mappingMethodCB->addItem( "Logarithmic" );
  mappingMethodCB->setCurrentIndex( 3 );
  connect( mappingMethodCB, SIGNAL( activated( int ) ),
    this, SLOT( setLumMappingMethod(int) ) );
  toolBar->addWidget( mappingMethodLabel );
  toolBar->addWidget( mappingMethodCB );
  
//  addToolBar( Qt::BottomToolBarArea, toolBar );  
  
  QToolBar *toolBarLR = addToolBar( tr( "Histogram" ) );
  lumRange = new LuminanceRangeWidget( toolBarLR );
  connect( lumRange, SIGNAL( updateRangeWindow() ), this,
    SLOT( updateRangeWindow() ) );
  toolBarLR->addWidget( lumRange );
//  addToolBar( toolBar );

  
  pointerPosAndVal = new QLabel( statusBar() );
  statusBar()->addWidget( pointerPosAndVal );
//  QFont fixedFont = QFont::defaultFont();
//  fixedFont.setFixedPitch( true );
//  pointerPosAndVal->setFont( fixedFont );
  zoomValue = new QLabel( statusBar() );
  statusBar()->addWidget( zoomValue );
  exposureValue = new QLabel( statusBar() );
  statusBar()->addWidget( exposureValue );

  connect( pfsView, SIGNAL(updatePointerValue()),
             this, SLOT(updatePointerValue()) );



  QMenu *frameMenu = menuBar()->addMenu( tr( "&Frame" ) );
  frameMenu->addAction( nextFrameAct );
  frameMenu->addAction( previousFrameAct );
  frameMenu->addSeparator();
  frameMenu->addAction( "&Save image...", this, SLOT(saveImage()), QKeySequence::Save ); 
  frameMenu->addAction( "&Copy image to clipboard", this, SLOT(copyImage()), QKeySequence::Copy ); 
  frameMenu->addSeparator();
  frameMenu->addAction( "&Quit", qApp, SLOT(quit()), Qt::Key_Q ); //QKeySequence::Quit
//.........这里部分代码省略.........
开发者ID:TriggerHappyRemote,项目名称:TriggerHappyRemote-iOS,代码行数:101,代码来源:main.cpp

示例6: QWizardPage

//  FolderPage
FolderPage::FolderPage(QWidget * parent)
: QWizardPage(parent)
{
   setTitle(tr("Alias Selection"));
   QGridLayout *grLayout = new QGridLayout();

   QLabel * lblAlias = new QLabel(tr("You should specify an alias for Maverick Poker Bot in this step. Memorize the selected alias, you will need it while using Maverick Poker Bot. You can specify the alias yourself or you can use the \"Random\" button for the installation wizard to offer you some random value."), this);
   lblAlias->setWordWrap(true);

   edtAlias_ = new QLineEdit(this);
   edtAlias_->setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9 ]+"), this));
   edtAlias_->setAlignment(Qt::AlignCenter);
   QFont fn = edtAlias_->font();
   fn.setBold(true);
   fn.setPointSize(24);
   edtAlias_->setFont(fn);
   edtAlias_->setMaxLength(120);
   connect(edtAlias_, SIGNAL(textChanged(const QString &)), 
      this, SLOT(aliased(const QString &)));
   
   //QLabel * lbl = new QLabel(tr("Select the folder where you would like Holdem Folder to be installed, then click Next.<p>The program requires at least 10 MB of disk space."), this);
   //lbl->setWordWrap(true);

   QLabel * lblPath = new QLabel(tr("&Path to Maverick Poker Bot:"), this);
   
   lePath_ = new QLineEdit(this);
   lePath_->setText("C:\\Program Files\\");
   lePath_->setEnabled(false);
   lblPath->setBuddy(lePath_);
   folderPrefix_ = "C:\\Program Files\\";

   QToolButton * btnRandom = new QToolButton(this);
   btnRandom->setIcon(QIcon(":/images/dice.png")); 
   btnRandom->setText(tr("&Random")); 
   btnRandom->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
   QPushButton * btnBrowse = new QPushButton(tr("&Browse..."), this);
   //btnBrowse->setFixedSize(20, 20);
   connect(btnBrowse, SIGNAL(clicked()), this, SLOT(browseDir()));
   connect(btnRandom, SIGNAL(clicked()), this, SLOT(random()));
   btnRandom->setMinimumHeight(edtAlias_->sizeHint().height());
   btnRandom->setMinimumWidth(btnBrowse->sizeHint().width());
   btnRandom->setIconSize(QSize(32, 32));
   
   int row = 0;
   //grLayout->addWidget(lbl,    row++, 0, 1, 2);

   //grLayout->addItem(new QSpacerItem(1, 20,
   //   QSizePolicy::Fixed, QSizePolicy::Fixed), row++, 0, 1, 2);
   grLayout->addWidget(lblAlias,  row++, 0, 1, 1);
   grLayout->addWidget(edtAlias_,  row, 0, 1, 1);
   grLayout->addWidget(btnRandom, row++, 1, 1, 1, Qt::AlignCenter);

   grLayout->addItem(new QSpacerItem(1, 20,
      QSizePolicy::Fixed, QSizePolicy::Fixed), row++, 0, 1, 2);

   grLayout->addWidget(lblPath,   row++, 0, 1, 2);
   grLayout->addWidget(lePath_,    row,   0, 1, 1);
   grLayout->addWidget(btnBrowse, row++, 1, 1, 1, Qt::AlignRight);

   setLayout(grLayout);
}
开发者ID:lazyrun,项目名称:pokerbot,代码行数:62,代码来源:Wizard.cpp

示例7: importXML

void DistroMesas::importXML(const QString val) {
  QFile file ( g_confpr->value( CONF_DIR_USER ) + "distromesas_" + mainCompany()->dbName() + ".cfn" );

    if (file.exists()) {
        if ( !file.open ( QIODevice::ReadOnly ) ) {
            
            return;
        } // end if
        QString result (file.readAll());
        file.close(); 


    QDomDocument doc ( "mydocument" );

    if ( !doc.setContent ( result ) ) {
	
        return;
    } // end if

    QDomElement docElem = doc.documentElement();
    QDomElement principal = docElem.firstChildElement ( "BACKGROUND" );
    m_background = principal.text();

    principal = docElem.firstChildElement ( "ESCALA" );
    g_escala = principal.text().toInt();


    QDomNodeList nodos = docElem.elementsByTagName ( "MESA" );
    int i = 0;
    while (i < nodos.count() ) {
        QDomNode ventana = nodos.item ( i++ );
        QDomElement e1 = ventana.toElement(); /// try to convert the node to an element.
        if ( !e1.isNull() ) { /// the node was really an element.
            QString nodoText = e1.text();
            /// Pasamos el XML a texto para poder procesarlo como tal.
            QString result;
            QTextStream stream ( &result );
            ventana.save(stream,5);

            Mesa *mesa = new Mesa((BtCompany *) mainCompany(), mui_widget);
            mesa->importXML(result);
	    
	    if (! m_listapantallas.contains(mesa->m_pantalla)) {
	        if (m_pantallaactual == "") {
		    m_pantallaactual = mesa->m_pantalla;
		} // end if
		m_listapantallas.append(mesa->m_pantalla);
		QToolButton *but = new QToolButton(this);
		but->setObjectName("p_"+mesa->m_pantalla);
		but->setText(mesa->m_pantalla);
		but->setMinimumHeight(42);
		but->setMinimumWidth(42);
		but->setCheckable(TRUE);
		mui_espaciopantallas->addWidget(but);
		connect(but, SIGNAL(clicked()), this, SLOT(cambiarPantalla()));
	    } // end if
	    if (mesa->m_pantalla == m_pantallaactual) 
		mesa->show();

        } // end if
    } // end while

} // end if

}
开发者ID:trifolio6,项目名称:Bulmages,代码行数:65,代码来源:mesas.cpp


注:本文中的QToolButton::setMinimumWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。