lcd->setGeometry(50,25,100,100);
slide->setRange(0,100);
slide->setValue(0);
slide->setGeometry(50,125,100,25);
connect(slide,SIGNAL(sliderMoved(int)),lcd,SLOT(display(int)));
hex
->setFont
(QFont("Times",
12));
hex->setGeometry(50,200,100,25);
[B
]connect(hex,
SIGNAL(clicked
()),lcd,
SLOT(setMode
(QLCDNumber::Hex)));
[/B
]
QLCDNumber *lcd=new QLCDNumber(3,this);
lcd->setMode(QLCDNumber::Dec);
lcd->setGeometry(50,25,100,100);
QSlider *slide = new QSlider(Qt::Horizontal,this);
slide->setRange(0,100);
slide->setValue(0);
slide->setGeometry(50,125,100,25);
connect(slide,SIGNAL(sliderMoved(int)),lcd,SLOT(display(int)));
QPushButton *hex = new QPushButton("Hexadecimal",this);
hex->setFont(QFont("Times",12));
hex->setGeometry(50,200,100,25);
[B]connect(hex,SIGNAL(clicked()),lcd,SLOT(setMode(QLCDNumber::Hex)));[/B]
To copy to clipboard, switch view to plain text mode
Bookmarks