hier mal mein Code:
Code: Alles auswählen
Magnifier::Magnifier( QWidget* parent ) : QWidget( parent )
{
zoomFactor = 2;
QPainter painter;
QPixmap *pixmap = new QPixmap(100,100);
painter.begin( pixmap );
pixmap->fill( QColor( 2, 2, 2 ) );
label = new QLabel("Magnification Level: ", this);
label->setGeometry( 70 , 5 , 100, 15 );
comboBox = new QComboBox(this);
comboBox->setGeometry( 175 , 5 , 50 , 20 );
comboBox->addItem("2x", 0);
comboBox->addItem("5x", 0);
comboBox->addItem("10x", 0);
QObject::connect( comboBox, SIGNAL( activated(int) ), this, SLOT( sltChangeZoomFactor(int) ) );
resize( 300, 300 );
show();
}
/edited by christian81: Benutzt die
Code: Alles auswählen
- Tags!