1
我用QListWidget在Mac上的Qt Creator的,这是我的代码QListWidget在Mac OS X显示异常
m_pListWidget->setObjectName(QStringLiteral("ttmanagevmlist"));
m_pListWidget->setFrameShape(QListWidget::NoFrame);
m_pListWidget->setAttribute(Qt::WA_TranslucentBackground,false);
m_pListWidget->setAlternatingRowColors(true);
m_pListWidget->setContentsMargins(0,0,0,0);
m_pListWidget->setResizeMode(QListView::Fixed);
m_pListWidget->setAutoScroll(true);
m_pListWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
但它显示不正常,像这样
它有蓝色边框,但是当它失去焦点时,这很正常。谁知道问题的原因?
介意解释在这种情况下*异常*的含义? – maxik
不,我的意思是它有一个蓝色的边框,但这个问题已经解决,该方法是demonlus的答案 – bai