setPalette(pal);
nameLabel
= new QLabel(tr
("Name"),
this);
nameLabel
->setFont
(QFont("Arial",
9));
QIcon icon
(":/images/plusbutton.png");
addButton->setIcon(icon);
addButton->setFlat(true);
addButton->setFixedSize(20,20);
connect(addButton,SIGNAL(pressed()),this,SLOT(addContact()));
hLay->addSpacing(5);
hLay->addWidget(nameLabel);
hLay->addStretch(1);
hLay->addWidget(addButton);
nameListWidget = new NameListWidget(c,this);
connect(nameListWidget,SIGNAL(clearContact()),this,SLOT(clearContact()));
//connect(nameListWidget,SIGNAL(currentRowChanged(int )),this,SLOT(selectionChanged(int )));
mainLayout->setMargin(0);
mainLayout->addSpacing(5);
mainLayout->addLayout(hLay);
mainLayout->addWidget(nameListWidget);
setLayout(mainLayout);
QPalette pal;
pal.setBrush(QPalette::Window,QBrush(QPixmap(":/images/background.png")));
setPalette(pal);
nameLabel = new QLabel(tr("Name"),this);
nameLabel->setFont(QFont("Arial",9));
QIcon icon(":/images/plusbutton.png");
addButton = new QPushButton(tr(""),this);
addButton->setIcon(icon);
addButton->setFlat(true);
addButton->setFixedSize(20,20);
connect(addButton,SIGNAL(pressed()),this,SLOT(addContact()));
QHBoxLayout *hLay = new QHBoxLayout;
hLay->addSpacing(5);
hLay->addWidget(nameLabel);
hLay->addStretch(1);
hLay->addWidget(addButton);
nameListWidget = new NameListWidget(c,this);
connect(nameListWidget,SIGNAL(currentItemChanged(QListWidgetItem *,QListWidgetItem *)),
this,SLOT(selectionChanged(QListWidgetItem *,QListWidgetItem *)));
connect(nameListWidget,SIGNAL(clearContact()),this,SLOT(clearContact()));
//connect(nameListWidget,SIGNAL(currentRowChanged(int )),this,SLOT(selectionChanged(int )));
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->setMargin(0);
mainLayout->addSpacing(5);
mainLayout->addLayout(hLay);
mainLayout->addWidget(nameListWidget);
setLayout(mainLayout);
To copy to clipboard, switch view to plain text mode
Bookmarks