Qt Designer how to change background

只愿长相守 提交于 2019-12-06 00:45:54

问题


This is an repost.

I am kind of new in QtDesigner and wanted to do something about the uglyness of just some buttons.

All i have done yesterday was looking on the internet on how to change the background color of a screen in Qt Designer. How to change the color of a button and how to make it flow into another color on the sides. Guess what.

I found nothing.

I hope that some of you die-hard coders know what i need..

EDIT 1: What i mean with a color flowing into another:

Here pink flows into purple, do you get what I mean?


回答1:


To make the changes of colors you can use stylesheets, in Qt Designer you must follow the following steps:

  1. Right click on the item you want to change and select: change stylesheet

  2. Then press the button to the color side and select background-color, Then select the color and press the OK buttons.

Output:

plus+:



来源:https://stackoverflow.com/questions/43282899/qt-designer-how-to-change-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!