fix icon and background problem on mac/win
This commit is contained in:
@@ -12,7 +12,7 @@ PRECOMPILED_HEADER = src/precompiled.h
|
||||
|
||||
QT += widgets
|
||||
QT += websockets
|
||||
QT += qml quick
|
||||
|
||||
|
||||
TARGET = SilentDragonLite
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ void AddressBook::open(MainWindow* parent, QLineEdit* target)
|
||||
QString cid = ab.cid->text();
|
||||
|
||||
|
||||
QString avatar = QString("res/") + ab.comboBoxAvatar->currentText() + QString(".png");
|
||||
QString avatar = QString(":/icons/res/") + ab.comboBoxAvatar->currentText() + QString(".png");
|
||||
qDebug()<<"AVATAR NAME : " << avatar;
|
||||
|
||||
if (addr.isEmpty() || newLabel.isEmpty())
|
||||
|
||||
@@ -510,7 +510,7 @@ void::MainWindow::addContact() {
|
||||
QString newLabel = request.labelRequest->text().trimmed();
|
||||
auto myAddr = request.myzaddr->text().trimmed();
|
||||
|
||||
QString avatar = QString("res/") + request.comboBoxAvatar->currentText() + QString(".png");
|
||||
QString avatar = QString(":/icons/res/") + request.comboBoxAvatar->currentText() + QString(".png");
|
||||
|
||||
if (addr.isEmpty() || newLabel.isEmpty())
|
||||
{
|
||||
|
||||
@@ -17,7 +17,8 @@ void ContactModel::renderContactList(QListView* view)
|
||||
|
||||
QString avatar = c.getAvatar();
|
||||
|
||||
QStandardItem* Items1 = new QStandardItem(QIcon(avatar) ,c.getName());
|
||||
QStandardItem* Items1 = new QStandardItem(c.getName());
|
||||
Items1->setData(QIcon(avatar),Qt::DecorationRole);
|
||||
contact->appendRow(Items1);
|
||||
view->setModel(contact);
|
||||
view->setIconSize(QSize(60,70));
|
||||
|
||||
Reference in New Issue
Block a user