• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
我是张洪铭我是熊博士
时光静好,与君同;细水长流,与君语
博客园    首页    新随笔    联系   管理    订阅  订阅

QListWidget QListView QListWidgetItem样式设置

两种方式都可以,一个通用,一个具体

//具体
QListWidget#listWidget_param::Item:hover,
QListWidget#listWidget_param::Item:selected {
    background-color:rgba(22, 29, 36, 1);
}

QListWidget#listWidget_param::Item:selected:!active {
    background-color:rgba(22, 29, 36, 1);
}

//通用
QListWidget::Item:hover,
QListWidget::Item:selected {
    background-color:rgba(22, 29, 36, 1);
}

QListWidget::Item:selected:!active {
    background-color:rgba(22, 29, 36, 1);
}

QListWidget{ //去掉选中时的虚线框
    outline:0px;
}

 

QListWidget顶上默认显示边框,隐藏边框:

    m_listWidget->setFrameShape(QListWidget::NoFrame);

 

posted @ 2019-12-18 18:33  我是张洪铭我是熊博士  阅读(9912)  评论(1)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3