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


C++ QLabel::setFrameStyle方法代码示例

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


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

示例1: QVBox

void TabDialog::setupTab1()
{
    QVBox *tab1 = new QVBox( this );
    tab1->setMargin( 5 );

    (void)new QLabel( "Filename:", tab1 );
    QLineEdit *fname = new QLineEdit( filename, tab1 );
    fname->setFocus();

    (void)new QLabel( "Path:", tab1 );
    QLabel *path = new QLabel( fileinfo.dirPath( TRUE ), tab1 );
    path->setFrameStyle( QFrame::Panel | QFrame::Sunken );

    (void)new QLabel( "Size:", tab1 );
    QLabel *size = new QLabel( QString( "%1 KB" ).arg( fileinfo.size() ), tab1 );
    size->setFrameStyle( QFrame::Panel | QFrame::Sunken );

    (void)new QLabel( "Last Read:", tab1 );
    QLabel *lread = new QLabel( fileinfo.lastRead().toString(), tab1 );
    lread->setFrameStyle( QFrame::Panel | QFrame::Sunken );

    (void)new QLabel( "Last Modified:", tab1 );
    QLabel *lmodif = new QLabel( fileinfo.lastModified().toString(), tab1 );
    lmodif->setFrameStyle( QFrame::Panel | QFrame::Sunken );

    addTab( tab1, "General" );
}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:27,代码来源:tabdialog.cpp

示例2: cb

CursorView::CursorView()			// construct view
{
    static struct {
	QCursorShape	shape;					
	const char*	name;			// cursor name
    } list[] = {
	{ ArrowCursor,		"arrowCursor" },
	{ UpArrowCursor,	"upArrowCursor" },
	{ CrossCursor,		"crossCursor" },
	{ WaitCursor,		"waitCursor" },
	{ IbeamCursor,		"ibeamCursor" },
	{ SizeVerCursor,	"sizeVerCursor" },
	{ SizeHorCursor,	"sizeHorCursor" },
	{ SizeBDiagCursor,	"sizeBDiagCursor" },
	{ SizeFDiagCursor,	"sizeFDiagCursor" },
	{ SizeAllCursor,	"sizeAllCursor" },
	{ BlankCursor,		"blankCursor" },
	{ SplitVCursor,		"splitVCursor" },
	{ SplitHCursor,		"splitHCursor" },
	{ PointingHandCursor,	"pointingHandCursor" },
	{ ForbiddenCursor,	"forbiddenCursor" },
	{ BitmapCursor,		"" }		// sentinel
    };

    setCaption( "CursorView" );			// set window caption

    QGridLayout* grid = new QGridLayout( this, 5, 4, 20 );
    QLabel *label;

    int i=0;
    for ( int y=0; y<4; y++ ) {			// create the small labels
	for ( int x=0; x<4; x++ ) {
	    if ( list[i].shape == BitmapCursor )
		break;

	    label = new QLabel( this );
	    label->setCursor( QCursor( list[i].shape ) );
	    label->setText( list[i].name );
	    label->setAlignment( AlignCenter );
	    label->setFrameStyle( QFrame::Box | QFrame::Raised );
	    grid->addWidget( label, x, y );
	    i++;
	}
    }

    QBitmap cb( cb_width, cb_height, cb_bits, TRUE );
    QBitmap cm( cm_width, cm_height, cm_bits, TRUE );
    QCursor custom( cb, cm );			// create bitmap cursor

    label = new QLabel( this );			// create the big label
    label->setCursor( custom );
    label->setText( "Custom bitmap cursor" );
    label->setAlignment( AlignCenter );
    label->setFrameStyle( QFrame::Box | QFrame::Sunken );
    grid->addMultiCellWidget( label, 4, 4, 0, 3 );

}
开发者ID:opieproject,项目名称:qte-opie,代码行数:57,代码来源:cursor.cpp

示例3: file

EDATool::EDATool() {
	this->setWindowTitle(tr("EDATool"));

	boardScene = new QGraphicsScene();
	
	boardView = new BoardView(this, boardScene);
	if (!QCoreApplication::arguments().contains("-nogl"))
		boardView->setViewport(new QGLWidget);
	
	QTabWidget *tabs = new QTabWidget(this);
	tabs->setFocusPolicy(Qt::NoFocus); // don't let the tab header itself steal focus
	tabs->addTab(boardView, QString("Document"));
	tabs->setDocumentMode(true);
	this->setCentralWidget(tabs);
	QDockWidget *temp = new QDockWidget(this);
	QTreeWidget *tree = new QTreeWidget(this);
	temp->setWindowTitle("Tool settings");
	temp->setWidget(tree);
	tree->setColumnCount(1);
	tree->setHeaderLabel("Name");
	this->addDockWidget(Qt::LeftDockWidgetArea, temp);
	
	this->fileMenu = this->menuBar()->addMenu(tr("File"));
	this->editMenu = this->menuBar()->addMenu(tr("Edit"));
	this->placeMenu = this->menuBar()->addMenu(tr("&Place"));
	
	QLabel *t = new QLabel("LOL FU");
	t->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
	this->statusBar()->addPermanentWidget(t);
	t = new QLabel("MOAR TESTING");
	t->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
	this->statusBar()->addPermanentWidget(t);
	this->statusBar()->showMessage("showmessage", 2000);
	resize(700, 500);
	//Board board;
	toolBar = addToolBar("Tools");
	toolBar->setIconSize(QSize(16, 16));
	
	toolActionGroup = new QActionGroup(this);
	
	SelectTool *selTool = new SelectTool(this);
	selTool->install();
	RouteTool *tool = new RouteTool(this);
	tool->install();
	cache = new QHash<QString, QGraphicsItemGroup*>();
	QFile file("C:\\Users\\andreas\\workspace\\edatool\\test.brd");
	EagleFormat *eagleFormat = new EagleFormat();
	eagleFormat->read(&file,cache);
	QHashIterator<QString, QGraphicsItemGroup*> i(*cache);
	while (i.hasNext()) {
		i.next();
		QTreeWidgetItem *item = new QTreeWidgetItem(tree, QStringList(i.key()));
	}
	connect(tree,SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),this,SLOT(itemClicked(QTreeWidgetItem*,QTreeWidgetItem*)));
}
开发者ID:elektronisk,项目名称:edatool,代码行数:55,代码来源:edatool.cpp

示例4: QWidget

//! [6]
GeneralTab::GeneralTab(const QFileInfo &fileInfo, QWidget *parent)
    : QWidget(parent)
{
    QLabel *fileNameLabel = new QLabel(tr("File Name:"));
    QLineEdit *fileNameEdit = new QLineEdit(fileInfo.fileName());

    QLabel *pathLabel = new QLabel(tr("Path:"));
    QLabel *pathValueLabel = new QLabel(fileInfo.absoluteFilePath());
    pathValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);

    QLabel *sizeLabel = new QLabel(tr("Size:"));
    qlonglong size = fileInfo.size()/1024;
    QLabel *sizeValueLabel = new QLabel(tr("%1 K").arg(size));
    sizeValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);

    QLabel *lastReadLabel = new QLabel(tr("Last Read:"));
    QLabel *lastReadValueLabel = new QLabel(fileInfo.lastRead().toString());
    lastReadValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);

    QLabel *lastModLabel = new QLabel(tr("Last Modified:"));
    QLabel *lastModValueLabel = new QLabel(fileInfo.lastModified().toString());
    lastModValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);

	QSlider* redSlider = new QSlider(Qt::Horizontal);
    redSlider->setTickPosition(QSlider::TicksBelow);
    redSlider->setTickInterval(5);

	QSlider* greenSlider = new QSlider(Qt::Horizontal);
    greenSlider->setTickPosition(QSlider::TicksBelow);
    greenSlider->setTickInterval(5);

	QSlider* blueSlider = new QSlider(Qt::Horizontal);
    blueSlider->setTickPosition(QSlider::TicksBelow);
    blueSlider->setTickInterval(5);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(fileNameLabel);
    mainLayout->addWidget(fileNameEdit);
    mainLayout->addWidget(pathLabel);
    mainLayout->addWidget(pathValueLabel);
    mainLayout->addWidget(sizeLabel);
    mainLayout->addWidget(sizeValueLabel);
    mainLayout->addWidget(lastReadLabel);
    mainLayout->addWidget(lastReadValueLabel);
    mainLayout->addWidget(lastModLabel);
    mainLayout->addWidget(lastModValueLabel);
	
	mainLayout->addWidget(redSlider);
	mainLayout->addWidget(greenSlider);
	mainLayout->addWidget(blueSlider);

    mainLayout->addStretch(1);
    setLayout(mainLayout);
}
开发者ID:cometyang,项目名称:EagleEye,代码行数:55,代码来源:tabdialog.cpp

示例5: show_about

void MainWindow::show_about()
{
   QDialog *aboutdialog = new QDialog(); 
   int pSize = aboutdialog->font().pointSize();
   aboutdialog->setWindowTitle("About");
   aboutdialog->setFixedSize(pSize*30,pSize*17);

   QVBoxLayout *templayout = new QVBoxLayout();
   templayout->setMargin(APP_MARGIN);

   QLabel *projectname = new QLabel(QString(APP_NAME) +"\t"+ QString(APP_VERS));
   projectname->setFrameStyle(QFrame::Box | QFrame::Raised);
   projectname->setAlignment(Qt::AlignCenter);
   QLabel *projectauthors = new QLabel("Designed by: Taranov Alex\n\nFirst release was in 2014");
   projectauthors->setWordWrap(true);
   projectauthors->setAlignment(Qt::AlignCenter);
   QLabel *hyperlink = new QLabel("<a href='mailto:[email protected]?subject=QVideoProcessing'>Contact us at [email protected]");
   hyperlink->setToolTip("Will try to open your default mail client");
   hyperlink->setOpenExternalLinks(true);
   hyperlink->setAlignment(Qt::AlignCenter);

   templayout->addWidget(projectname);
   templayout->addWidget(projectauthors);
   templayout->addWidget(hyperlink);

   aboutdialog->setLayout(templayout);
   aboutdialog->exec();

   delete hyperlink;
   delete projectauthors;
   delete projectname;
   delete templayout;
   delete aboutdialog;
}
开发者ID:pi-null-mezon,项目名称:QVideoProcessing,代码行数:34,代码来源:mainwindow.cpp

示例6: slotIdentifyScreens

void BGDialog::slotIdentifyScreens()
{
    // Taken from PositionTab::showIdentify in kdebase/kcontrol/kicker/positiontab_impl.cpp
    for (unsigned s = 0; s < m_numScreens; s++) {
        QLabel *screenLabel = new QLabel(0, Qt::X11BypassWindowManagerHint);
        screenLabel->setObjectName("Screen Identify");

        QFont identifyFont(KGlobalSettings::generalFont());
        identifyFont.setPixelSize(100);
        screenLabel->setFont(identifyFont);

        screenLabel->setFrameStyle(QFrame::Panel);
        screenLabel->setFrameShadow(QFrame::Plain);

        screenLabel->setAlignment(Qt::AlignCenter);
        screenLabel->setNum(int(s + 1));
        // BUGLET: we should not allow the identification to be entered again
        //         until the timer fires.
        QTimer::singleShot(1500, screenLabel, SLOT(deleteLater()));

        QPoint screenCenter(QApplication::desktop()->screenGeometry(s).center());
        QRect targetGeometry(QPoint(0, 0), screenLabel->sizeHint());
        targetGeometry.moveCenter(screenCenter);

        screenLabel->setGeometry(targetGeometry);

        screenLabel->show();
    }
}
开发者ID:aarontc,项目名称:kde-workspace,代码行数:29,代码来源:bgdialog.cpp

示例7: QGridLayout

void Widget::build3x3frame(QFrame *box3x3frame, int rowStart, int colStart, int QMap)
{
    box3x3frame->setFrameStyle(QFrame::Plain);
    box3x3frame->setFrameShape(QFrame::Box);
    QGridLayout* box3x3 = new QGridLayout(box3x3frame);
    box3x3->setSpacing(0);
    box3x3->setMargin(0);
    int x = rowStart%9;
    for (int i = 0; i < 3; ++i)
    {
        int y = colStart%9;
        for (int j = 0; j < 3; ++j)
        {
            QLabel* cell = new QLabel("");
            cell->setAlignment(Qt::AlignCenter);
            //cell->setAlignment(Qt::AlignVCenter);
            if(QMap) originPointToCellMap.insert(QPair<int,int>(x,y++),cell);
            else     resultPointToCellMap.insert(QPair<int,int>(x,y++),cell);
            cell->setFrameStyle(QFrame::Plain);
            cell->setFrameShape(QFrame::Box);
            cell->setMargin(5);
            box3x3->addWidget(cell,i,j,1,1);
        }
        x++;
    }
}
开发者ID:2easy4wizzi,项目名称:soduku,代码行数:26,代码来源:widget.cpp

示例8: AddColor

void OBSPropertiesView::AddColor(obs_property_t *prop, QFormLayout *layout,
		QLabel *&label)
{
	QPushButton *button     = new QPushButton;
	QLabel      *colorLabel = new QLabel;
	const char  *name       = obs_property_name(prop);
	long long   val         = obs_data_get_int(settings, name);
	QColor      color       = color_from_int(val);

	button->setText(QTStr("Basic.PropertiesWindow.SelectColor"));

	colorLabel->setFrameStyle(QFrame::Sunken | QFrame::Panel);
	colorLabel->setText(color.name(QColor::HexArgb));
	colorLabel->setPalette(QPalette(color));
	colorLabel->setAutoFillBackground(true);
	colorLabel->setAlignment(Qt::AlignCenter);

	QHBoxLayout *subLayout = new QHBoxLayout;
	subLayout->setContentsMargins(0, 0, 0, 0);

	subLayout->addWidget(colorLabel);
	subLayout->addWidget(button);

	WidgetInfo *info = new WidgetInfo(this, prop, colorLabel);
	connect(button, SIGNAL(clicked()), info, SLOT(ControlChanged()));
	children.emplace_back(info);

	label = new QLabel(QT_UTF8(obs_property_description(prop)));
	layout->addRow(label, subLayout);
}
开发者ID:Antidote,项目名称:obs-studio,代码行数:30,代码来源:properties-view.cpp

示例9: QStatusBar

StatusBar::StatusBar( QWidget* parent )
    : QStatusBar( parent )
{
    // create labels
    QLabel* label;
    
    label = ( mLabels[ltCursorPosition] = new QLabel( this ) );
    label->setToolTip( tr( "Cursor position" ) );
    
    label = ( mLabels[ltSaveState] = new QLabel( this ) );
    label->setToolTip( tr( "Modification state of file" ) );
    
    label = ( mLabels[ltEOLMode] = new QLabel( this ) );
    label->setToolTip( tr( "EOL mode" ) );
    
    label = ( mLabels[ltIndentMode] = new QLabel( this ) );
    label->setToolTip( tr( "Indentation mode" ) );
    
    // add labels
    for ( int i = ltCursorPosition; i < ltIndentMode +1; i++ )
    {
        label = mLabels[ i ];
        addPermanentWidget( label );
        label->setMargin( 2 );
        label->setFrameStyle( QFrame::NoFrame );
        label->setAttribute( Qt::WA_MacSmallSize );
    }
    
    // force remove statusbar label frame
    setStyleSheet( "QStatusBar::item { border: 0px; }" );
    
    // connections
    connect( this, SIGNAL( messageChanged( const QString& ) ), this, SLOT( setMessage( const QString& ) ) );
}
开发者ID:pasnox,项目名称:monkeystudio2,代码行数:34,代码来源:StatusBar.cpp

示例10: getFixedPanel

QLabel* RTIMULibDemo::getFixedPanel(QString text)
{
    QLabel *label = new QLabel(text);
    label->setFrameStyle(QFrame::Panel);
    label->setFixedSize(QSize(100, 16));
    return label;
}
开发者ID:Delan90,项目名称:RTIMULib2,代码行数:7,代码来源:RTIMULibDemo.cpp

示例11: initialize

void CQTs_ChSkillsViewer::initialize(){
    train = new QPushButton(tr("Show only trained"));
    train->setCheckable(true);
    connect(train,SIGNAL(released()),this,SLOT(showOnlyTrained()));
    // grid->addWidget(train,0,0,1,3);
    QVBoxLayout *vl  = new QVBoxLayout();
    vl->addWidget(train);
    QWidget *container = new QWidget();

    QScrollArea *scroll = new QScrollArea();

    scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    int rows=0;// number of rows before the skill list
    QGridLayout *grid = new QGridLayout();




    for (int i = 0; i < eng->skillNum(); ++i) {
        QLabel *tLab = new QLabel(eng->skillData(i).myName());
        tLab->setAlignment(Qt::AlignCenter);
        Labels.push_back(tLab);//[i*8+0] name

        grid->addWidget(tLab,i+rows,0);
        grid->addWidget(tLab= new QLabel("0"),i+rows,1);
        tLab->setAlignment(Qt::AlignCenter);
        Labels.push_back(tLab);//[i*8+1] d20

        tLab->setFrameStyle(QFrame::Panel|QFrame::Raised);
        grid->addWidget(tLab= new QLabel("="),i+rows,2);
        tLab->setAlignment(Qt::AlignCenter);
        Labels.push_back(tLab);

        grid->addWidget(tLab= new QLabel("0"),i+rows,3);
        tLab->setAlignment(Qt::AlignCenter);
        Labels.push_back(tLab);//[i*8+3] abl mod

        grid->addWidget(tLab= new QLabel("+"),i+rows,4);
        tLab->setAlignment(Qt::AlignCenter);
        Labels.push_back(tLab);

        grid->addWidget(tLab= new QLabel("0"),i+rows,5);
        tLab->setAlignment(Qt::AlignCenter);
        Labels.push_back(tLab);//[i*8+5] ranks

        grid->addWidget(tLab= new QLabel("+"),i+rows,6);
        tLab->setAlignment(Qt::AlignCenter);
        Labels.push_back(tLab);

        grid->addWidget(tLab= new QLabel("0"),i+rows,7);
        tLab->setAlignment(Qt::AlignCenter);
        Labels.push_back(tLab);//[i*8+7] var mods
    }
    container->setLayout(grid);
    scroll->setWidget(container);
    scroll->setWidgetResizable(true);
    scroll->setMinimumWidth(300);
    vl->addWidget(scroll);
    setLayout(vl);
}
开发者ID:Iximiel,项目名称:CharaQTersheet,代码行数:60,代码来源:cqts_viewers.cpp

示例12: QWidget

LivePanel::LivePanel(QWidget *parent) :
        QWidget(parent)
{
    QVBoxLayout *vboxLayout = new QVBoxLayout(this);
    vboxLayout->setSpacing(0);
    vboxLayout->setMargin(0);

    splitter = new QSplitter(this);
    splitter->setOrientation(Qt::Vertical);
    splitter->setOpaqueResize(false);
    vboxLayout->addWidget(splitter);

    QListView *listView = new QListView(splitter);
    //listView1->setSizePolicy(* new QSizePolicy(QSizePolicy::Preferred,QSizePolicy::Maximum));
    //listView1->setGeometry(0,0,400,300);
    QFrame *frame = new QFrame(splitter);
    frame->setStyleSheet("background-color:white");
    //QMessageBox::about(this,QString::number(frame1->width()),"");
    //frame1->resize(frame1->width(),frame1->width()*3/4);
    frame->resize(256,192);
    //frame1->setFrameStyle(QFrame::Raised);
    QLabel *label = new QLabel(frame);
    label->setGeometry(10,10,400,300);
    label->setFrameStyle(QFrame::Box);
    label->setStyleSheet("background-color:green");
    label->setText("<html><head><body><center><h1>上山打老虎 1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>0<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>0<br><h1></center></body></html>");

}
开发者ID:anderson916,项目名称:FreeWorship,代码行数:28,代码来源:LivePanel.cpp

示例13: main

int main(int argc, char** argv) {
	QApplication app(argc, argv);

	QWidget wgt;
	wgt.setWindowTitle("LineEdit");

	QLabel* plblDisplay = new QLabel;
	plblDisplay->setFrameStyle(QFrame::Box | QFrame::Raised);
	plblDisplay->setLineWidth(2);
	plblDisplay->setFixedHeight(50);

	QLabel* plblText = new QLabel("&Text");
	QLineEdit* ptxt = new QLineEdit;
	plblText->setBuddy(ptxt);
	QObject::connect(ptxt, SIGNAL(textChanged(const QString&)), plblDisplay, SLOT(setText(const QString&)));

	QLabel* plblPassword = new QLabel("&Password");
	QLineEdit* ptxtPassword = new QLineEdit;
	plblPassword->setBuddy(ptxtPassword);
	ptxtPassword->setEchoMode(QLineEdit::Password);
	QObject::connect(ptxtPassword, SIGNAL(textChanged(const QString&)), plblDisplay, SLOT(setText(const QString&)));

	QVBoxLayout* pvbxLayout = new QVBoxLayout;
	pvbxLayout->addWidget(plblDisplay);
	pvbxLayout->addWidget(plblText);
	pvbxLayout->addWidget(ptxt);
	pvbxLayout->addWidget(plblPassword);
	pvbxLayout->addWidget(ptxtPassword);

	wgt.setLayout(pvbxLayout);

	wgt.show();
	return app.exec();
}
开发者ID:glazatkina,项目名称:qt_Labs,代码行数:34,代码来源:main.cpp

示例14: about

void MainWindow::about()
{
   QDialog *aboutdialog = new QDialog();
   int pSize = aboutdialog->font().pointSize();
   aboutdialog->setWindowTitle("About");
   aboutdialog->setFixedSize(pSize*27,pSize*17);

   QVBoxLayout *templayout = new QVBoxLayout();
   templayout->setMargin(5);

   QLabel *projectname = new QLabel(QString(APP_NAME) +"\t"+ QString(APP_VERSION));
   projectname->setFrameStyle(QFrame::Box | QFrame::Raised);
   projectname->setAlignment(Qt::AlignCenter);
   QLabel *projectauthors = new QLabel(QString(APP_DESIGNER) + "\n\nBMSTU\n\nNovember of 2015");
   projectauthors->setWordWrap(true);
   projectauthors->setAlignment(Qt::AlignCenter);
   QLabel *hyperlink = new QLabel("<a href='mailto:[email protected]?subject=Pointmetry'>Contact us at [email protected]");
   hyperlink->setOpenExternalLinks(true);
   hyperlink->setAlignment(Qt::AlignCenter);

   templayout->addWidget(projectname);
   templayout->addWidget(projectauthors);
   templayout->addWidget(hyperlink);

   aboutdialog->setLayout(templayout);
   aboutdialog->exec();

   delete hyperlink;
   delete projectauthors;
   delete projectname;
   delete templayout;
   delete aboutdialog;
}
开发者ID:pi-null-mezon,项目名称:Interview,代码行数:33,代码来源:mainwindow.cpp

示例15: ShowStatusLabels

void QmitkToolTrackingStatusWidget::ShowStatusLabels()
{
  RemoveGuiLabels(); 

  if(m_NavigationDatas == NULL || m_NavigationDatas->size() <= 0)
    return;


  m_StatusLabels = new QVector<QLabel*>();
  mitk::NavigationData* navData;
  QLabel* label;


  for(unsigned int i = 0; i < m_NavigationDatas->size(); i++)
  {
    navData = m_NavigationDatas->at(i).GetPointer();

    QString name(navData->GetName());
   
    label = new QLabel(name, this);
    label->setObjectName(name);
    label->setAlignment(m_Alignment | Qt::AlignVCenter);
    label->setFrameStyle(QFrame::Panel | QFrame::Sunken);

    m_StatusLabels->append(label);
    if (m_Style == QmitkToolTrackingStatusWidget::VerticalUpperStyle) m_Controls->m_VerticalLayout->addWidget(m_StatusLabels->at(i));
    else m_Controls->m_GridLayout->addWidget(m_StatusLabels->at(i),0,i);
    
  }
}
开发者ID:david-guerrero,项目名称:MITK,代码行数:30,代码来源:QmitkToolTrackingStatusWidget.cpp


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