Qt 之QSpinBox类

         QSpinBox * m_spinbox = new QSpinBox ( this );
    m_spinbox->setSingleStep(2);
    m_spinbox->setRange(0,100); //设置变换范围
    m_spinbox->setSuffix("km"); //设置输出显示后缀。
    m_spinbox->setPrefix("$"); //设置输出显示前缀。
    m_spinbox->resize(100,20); //设置大小
    m_spinbox->setValue(50); //设置初始值

猜你喜欢

转载自blog.csdn.net/twfx1027/article/details/46650827