#include <QApplication>
#include <QMainWindow>
#include <QScrollArea>
int main( int argc, char **argv )
{
qw->resize(100,100);
qw->move(80,80);
//qw->setGeometry(80,80,100,100);
sa->setWidget(qw);
mw->setCentralWidget( sa );
mw->show();
return a.exec();
}
#include <QApplication>
#include <QMainWindow>
#include <QScrollArea>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QMainWindow *mw = new QMainWindow();
QScrollArea *sa = new QScrollArea( mw );
sa->setPalette( QPalette( QColor(41,141,40) ) );
QWidget *qw = new QWidget( sa );
qw->setPalette( QPalette( QColor(41,161,90) ) );
qw->resize(100,100);
qw->move(80,80);
//qw->setGeometry(80,80,100,100);
sa->setWidget(qw);
mw->setCentralWidget( sa );
mw->show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks