zoukankan      html  css  js  c++  java
  • QT——QPoint类详解

    QPoint类的主要功能是定义了平面上的一个点的坐标,数据类型为int类型,如果想要float类型就需要QPointF。

    公共函数

    QPoint ()
    QPoint ( int x, int y )
    bool isNull () const——Returns true if both the x and y coordinates are set to 0, otherwise returns false.
    int manhattanLength () const——返回x()和y()的绝对值得和,就是传统上的从原点开始的矢量的“曼哈顿长度”
    int & rx ()——得到横坐标的引用
    int & ry ()——得到纵坐标的引用
    void setX ( int x )——设置横坐标
    void setY ( int y )——设置纵坐标
    int x () const——获得横坐标
    int y () const——获得纵坐标
    QPoint & operator*= ( float factor )
    QPoint & operator*= ( double factor )
    QPoint & operator*= ( int factor )
    QPoint & operator+= ( const QPoint & point )
    QPoint & operator-= ( const QPoint & point )
    QPoint & operator/= ( qreal divisor )
  • 相关阅读:
    database使用
    画图工具
    宝塔面板权限不足问题解决
    nginx查看并发数量
    台式机未插入扬声器或者耳机
    键盘出现乱码解决
    lnmp宝塔面板问题
    nginx+mysql双主搭建
    zabbix客户端安装
    java生产条形码
  • 原文地址:https://www.cnblogs.com/baiweituyou/p/14427267.html
Copyright © 2011-2022 走看看