简体   繁体   中英

Background-image for QLineEdit

How to set background image for QLineEdit ? The following style sheet doesn't work

QLineEdit {
  background-image:url(:/images/13.png);
}
QLineEdit { 
   border: 1px solid #000000;   //image work with this line and didn't work with out))
   image: url(:/images/13.png);
}

better solution is:

#fileFilter
{
    background: url(/Users/karelhladky/Pictures/Icons/famfamfam/icons/emoticon_grin.png);
        // there is no need add border property
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM