Home > other >  QTabWidget can add the background image? How to add?
QTabWidget can add the background image? How to add?

Time:12-28

The image below is my interface, want to put a background image in QTabWidget, found only in the Demo QTabWidget change background color example, didn't find there are examples of add images, please directly

CodePudding user response:

Are there not void setTabIcon (int index, const QIcon & amp; Icon) function?

CodePudding user response:

setstylesheet

CodePudding user response:

SetStyleSheet (background - image: url (fill in your image path here, pay attention to the path of slash));

CodePudding user response:

Can also be in a paintEvent map background

CodePudding user response:

This not line, complains, you need to use the event filters to draw pictures,
  • Related