Seite 1 von 1

QScrollarea

Verfasst: 8. Februar 2007 10:46
von Whitefurrows
Hallo,

wie kann ich in einer QScrollarea mehrere Widgets darstellen? Zum Beispiel wie beim Acrobat oder in Word mehrere Seiten. Ist zufällig ein Beispiel dazu bekannt?

Re: QScrollarea

Verfasst: 8. Februar 2007 12:51
von patrik08
Whitefurrows hat geschrieben:Hallo,

wie kann ich in einer QScrollarea mehrere Widgets darstellen? Zum Beispiel wie beim Acrobat oder in Word mehrere Seiten. Ist zufällig ein Beispiel dazu bekannt?

ich habe es so.... gemacht ...

Code: Alles auswählen


void Image_Base::Load_Connector()
{
    scroll = new QScrollArea(this);
    scroll->setBackgroundRole(QPalette::Dark);
    scroll->setMinimumWidth(500);
    wrapper = new QWidget(this);
    flow = new FlowLayout(wrapper);
    comio = new Comandi();
    comio->SetName(nomefilmopersona);
    connect(comio , SIGNAL(NewIImage(QString,QString)), this, SLOT(AppendImage(QString,QString) ) );
    connect(comio , SIGNAL(SaveFakes()), this, SLOT(ReSaveOnDb() ) );
    flow ->addWidget(comio);
    wrapper->setLayout(flow);
    scroll->setWidget(wrapper);
    connect(curl , SIGNAL(OneFilePutEnd(bool) ), this, SLOT(SenderOnePutBack(bool) ) );                      
    connect(curl , SIGNAL(ErrorCurl(QString) ), this, SLOT(CurlMistake(QString) ) );
    connect(curl, SIGNAL(NextGrabList(int)), this, SLOT(ImageLoadPosition(int)));    
    ////////////connect(curl, SIGNAL(ErrorCurl(QString)), this, SLOT(SegnalaErrore(QString)));    
}



bei jedem insert mache ich einfach scroll->setMinimumHeight(500 + hoehvon neu....);

beim delete minus....


die class FlowLayout ist im demo oder example von qt 4.1

Verfasst: 9. Februar 2007 18:18
von Whitefurrows
Das sieht gut aus ;-) vielen Dank!!!