QML控件 – Rectangle

说明

可见的矩形区域,可用来绘制背景

1.使用场景一:制作矩形块

import QtQuick 2.9
import QtQuick.Window 2.2Window {visible: truewidth: 640height: 480title: qsTr("Hello World")Rectangle{anchors.centerIn: parentwidth: 100height: 50color: "red"}
}

2.使用场景二:结合MouseArea制作圆形按钮

import QtQuick 2.9
import QtQuick.Window 2.2Window {visible: truewidth: 640height: 480title: qsTr("Hello World")Rectangle{id:rectanchors.centerIn: parentwidth: 100height: 100radius: 50color: "green"MouseArea{anchors.fill: parentonPressed: {rect.scale = 0.9}onReleased: {rect.scale = 1.0}}}
}

持续更新中,请大家多多关注…

1. Rectangle的基本使用相关推荐

  1. poj 2559 Largest Rectangle in a Histogram 栈

    // poj 2559 Largest Rectangle in a Histogram 栈 // // n个矩形排在一块,不同的高度,让你求最大的矩形的面积(矩形紧挨在一起) // // 这道题用的 ...

  2. LeetCode 笔记系列 18 Maximal Rectangle [学以致用](最大矩形)

    leetcode之Largest Rectangle in Histogram 标签: leetcode面试题最大矩形堆栈单调队列 2016-07-30 13:47 1325人阅读 评论(0) 收藏  ...

  3. OpenCV 学习笔记03 boundingRect、minAreaRect、minEnclosingCircle、boxPoints、int0、circle、rectangle函数的用法...

    函数中的代码是部分代码,详细代码在最后 1 cv2.boundingRect 作用:矩形边框(boundingRect),用于计算图像一系列点的外部矩形边界. cv2.boundingRect(arr ...

  4. 【leetcode】85. Maximal Rectangle 0/1矩阵的最大全1子矩阵

    1. 题目 Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1 ...

  5. matplotlib可视化基本散点图、在图像指定区域绘制方框(Draw Rectangle)

    matplotlib可视化基本散点图.在图像指定区域绘制方框(Draw Rectangle) 目录 matplotlib可视化基本散点图.在图像指定区域绘制方框(Draw Rectangle)

  6. matplotlib可视化基本散点图、在图像指定区域绘制方框并进行自定义色彩填充(Draw Rectangle filled with color)

    matplotlib可视化基本散点图.在图像指定区域绘制方框并进行自定义色彩填充(Draw Rectangle filled with color) 目录

  7. cv2.rectangle()画出矩形的用法

    cv2.rectangle(img, (x,y), (x+w,y+h), (0,255,0), 2) 功能:画出矩行框 参数:img:原图 (x,y):矩阵的左上点坐标 (x+w,y+h):矩阵的右下 ...

  8. LeetCode 850. Rectangle Area II

    题目地址: We are given a list of (axis-aligned) rectangles. Each rectangle[i] = [x1, y1, x2, y2] , where ...

  9. LeetCode 85. Maximal Rectangle --python,java解法

    题目地址: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1 ...

  10. LeetCode hard 84. Largest Rectangle in Histogram--python,java 15行,c++ 15行 解法

    题目地址: Given n non-negative integers representing the histogram's bar height where the width of each ...

最新文章

  1. Java和.NET使用DES对称加密的区别
  2. luogu P2679——子串
  3. TopHQBooks – PDF 搜索引擎 - 小众软件
  4. ITK:在傅立叶域中过滤图像
  5. Swift UIlabel 的高级用法,文本显示表情,图片
  6. Java-日期 正则表达式
  7. 《软件项目管理(第二版)》第 4 章——项目估算 重点部分总结
  8. ARM Cortex M3指令集
  9. chrome vue 未响应_vue之骨架屏踩坑之路
  10. [转]Spring 注解总结
  11. java基本的商品管理系统
  12. 经典的850棋牌游戏搭建教学
  13. Java编写五线谱上的音符_五线谱音符(五线谱1234567表示图)
  14. 面试案例-String Interpolation的实现(Java实现)
  15. Linux程序动态库的加载
  16. 软考查缺补漏?这篇《软件知识产权基础知识考点整理》了解一下?
  17. 网线制作方法-RJ45
  18. delphi如何将字符串复制到剪贴板上
  19. coursera机器学习第二周编程作业
  20. C语言 请编写函数CHG(char *S) 把字符数组左移后逆转

热门文章

  1. iOS开发之Objective-C(中级篇)-李飞-专题视频课程
  2. 【HTML】HTML作业----实现Windows计算器
  3. 你所需要了解的关于技术团队的要求
  4. Excel统一将多种段落标记号替换为黑方块的操作
  5. 安卓桌面软件_银河麒麟桌面操作系统是易用性和兼容性良好兼容的国产桌面操作系统...
  6. 基于Android的多功能日程表,基于android的多功能日程表系统的设计与实现.doc
  7. 丁小平先生的学术成就启示我们要学好哲学
  8. 渐进式应用程序Progressive Web Applications(PWA)全面指南
  9. FFmpeg Windows 10系统下的使用教程
  10. debian 10安装英伟达独显驱动