Hi to all again!
I have a small nasty error. I have this code chunk:
// label creation
m_pTotalLabel
=new QLabel(tr
("SKUPAJ:"),
this);
// creates new label Q_CHECK_PTR(m_pTotalLabel); // checks creation
//m_pTotalLabel->setFrameStyle(QFrame::Panel | QFrame::Raised);
m_pTotalLabel->setAutoFillBackground(true);
QPalette TotalFieldPalette
=m_pTotalLabel
->palette
();
// gets current pallete of current widget TotalFieldPalette.
setColor(QPalette::Base, Qt
::black);
// sets backgorund color of widget TotalFieldPalette.
setColor(QPalette::Text, Qt
::white);
// sets foreground color of widget m_pTotalLabel->setPalette(TotalFieldPalette); // sets palette
m_pTotalLayout->addWidget(m_pTotalLabel); // adds widget to layout
// **** end of label creation
// label creation
m_pTotalLabel=new QLabel(tr("SKUPAJ:"), this); // creates new label
Q_CHECK_PTR(m_pTotalLabel); // checks creation
//m_pTotalLabel->setFrameStyle(QFrame::Panel | QFrame::Raised);
m_pTotalLabel->setAutoFillBackground(true);
QPalette TotalFieldPalette=m_pTotalLabel->palette(); // gets current pallete of current widget
TotalFieldPalette.setColor(QPalette::Base, Qt::black); // sets backgorund color of widget
TotalFieldPalette.setColor(QPalette::Text, Qt::white); // sets foreground color of widget
m_pTotalLabel->setPalette(TotalFieldPalette); // sets palette
m_pTotalLayout->addWidget(m_pTotalLabel); // adds widget to layout
// **** end of label creation
To copy to clipboard, switch view to plain text mode
Well, the label is not shown. Why???!!!
Bookmarks