当前位置:网站首页>QT creator shape

QT creator shape

2022-07-06 11:04:00 it_ xiangqiang



Qt Creator shape



shape

You can use Rectangle Type in the “ form editor ” Draw basic shapes in .

Qt Creator shape _ Round corners

Most visual types in the library are based on project types . Even if it has no visual appearance ( for example , Similar to the mouse area ), It also defines all attributes common to all visual types , Such as the location , Size and visibility .

Besides , Each type has a set of attributes that specify its visual appearance and behavior . You can modify the attribute values to set the fill and border colors , Stroke width and other characteristics of shape .

The following sections describe the available shapes and their properties in more detail . You can go to “ attribute ” Modify the value of the attribute in the view .

Rectangle

Basic rectangle QML Type is used to draw a shape with four edges and corners and a solid border .

It can be used in “ Color ” Field to fill the rectangle with a solid color or a linear gradient . You can also use the color selector to select a color , And use the gradient selector from the predefined WebGradients Centralized selection gradient .

By setting “ Border color ” and “ Frame ” Value of field , You can add an optional solid border to a rectangle with its own color and thickness . To create a border without a fill color , Please select the button that sets the color to transparent .

By setting “ radius ” Value of field , You can create shapes with rounded corners . Use rectangular width,height and radius Correct combination of attribute values , You can create ellipses and circles . for example , To draw a complete circle , Please draw a rectangle first , Make all four sides equal , Then set its radius to half the side length .

When drawing curved edges , Consider enabling “ attribute ” View's “ senior ” Tab “ Anti-Aliasing ” Check box , To improve the appearance of the shape .



原网站

版权声明
本文为[it_ xiangqiang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131645145441.html