How can I create QFrame on form ui?
General and Desktop
3
Posts
2
Posters
901
Views
1
Watching
-
@
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include <QLayout>MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);QFrame *mFrame = new QFrame(this); mFrame->setGeometry(50, 50, 100, 100); mFrame->setStyleSheet("background-color:black;"); this->layout()->addWidget(mFrame);}
@