bgWidget
->setObjectName
(QString::fromUtf8("bgWidget"));
bgWidget->setStyleSheet("QWidget#bgWidget{background-image: url(:/images/Resource/n8_home_bg.jpg);}");
QFont sansFont
("Helvetica [Cronyx]",
15);
// create buttons
video
->setObjectName
(QString::fromUtf8("video"));
video
->setStyleSheet
(QString::fromUtf8("QPushButton#video{\n" " border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #0f3f5c, stop: 1 #0a354e);\n"
"}\n"
"\n"
"QPushButton#video:pressed{\n"
" border: 1px solid #333; \n"
" color: #8a9fac; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #adcbd9, stop: 1 #fff);\n"
"}"));
video->setFixedHeight(80);
video->setFont(sansFont);
photo
->setObjectName
(QString::fromUtf8("photo"));
photo
->setStyleSheet
(QString::fromUtf8("QPushButton#photo{\n" " border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #0f3f5c, stop: 1 #0a354e);\n"
"}\n"
"\n"
"QPushButton#photo:pressed{\n"
" border: 1px solid #333; \n"
" color: #8a9fac; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #adcbd9, stop: 1 #fff);\n"
"}"));
photo->setFixedHeight(80);
photo->setFont(sansFont);
radio
->setObjectName
(QString::fromUtf8("radio"));
radio
->setStyleSheet
(QString::fromUtf8("QPushButton#radio{\n" " border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #0f3f5c, stop: 1 #0a354e);\n"
"}\n"
"\n"
"QPushButton#radio:pressed{\n"
" color: #8a9fac; \n"
" border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #adcbd9, stop: 1 #fff);\n"
"}"));
radio->setFixedHeight(80);
radio->setFont(sansFont);
news
->setObjectName
(QString::fromUtf8("news"));
news
->setStyleSheet
(QString::fromUtf8("QPushButton#news{\n" " border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #0f3f5c, stop: 1 #0a354e);\n"
"}\n"
"\n"
"QPushButton#news:pressed{\n"
" border: 1px solid #333; \n"
" color: #8a9fac; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #adcbd9, stop: 1 #fff);\n"
"}"));
news->setFixedHeight(80);
news->setFont(sansFont);
// Setup button layouts
buttonLayout->setContentsMargins(0,150,0,3);
buttonLayout->setSpacing(3);
buttonLayout->addWidget(video);
buttonLayout->addWidget(photo);
buttonLayout->addWidget(radio);
buttonLayout->addWidget(news);
bgWidget->setLayout(buttonLayout);
// Setup main layout
mainLayout->setContentsMargins(0,0,0,0);
mainLayout->addWidget(bgWidget);
this->setLayout(mainLayout);
QWidget *bgWidget = new QWidget(this);
bgWidget->setObjectName(QString::fromUtf8("bgWidget"));
bgWidget->setStyleSheet("QWidget#bgWidget{background-image: url(:/images/Resource/n8_home_bg.jpg);}");
QFont sansFont("Helvetica [Cronyx]", 15);
// create buttons
QPushButton *video = new QPushButton("VIDEOS");
video->setObjectName(QString::fromUtf8("video"));
video->setStyleSheet(QString::fromUtf8("QPushButton#video{\n"
" border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #0f3f5c, stop: 1 #0a354e);\n"
"}\n"
"\n"
"QPushButton#video:pressed{\n"
" border: 1px solid #333; \n"
" color: #8a9fac; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #adcbd9, stop: 1 #fff);\n"
"}"));
video->setFixedHeight(80);
video->setFont(sansFont);
QPushButton *photo = new QPushButton("PHOTOS");
photo->setObjectName(QString::fromUtf8("photo"));
photo->setStyleSheet(QString::fromUtf8("QPushButton#photo{\n"
" border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #0f3f5c, stop: 1 #0a354e);\n"
"}\n"
"\n"
"QPushButton#photo:pressed{\n"
" border: 1px solid #333; \n"
" color: #8a9fac; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #adcbd9, stop: 1 #fff);\n"
"}"));
photo->setFixedHeight(80);
photo->setFont(sansFont);
QPushButton *radio = new QPushButton("RADIO");
radio->setObjectName(QString::fromUtf8("radio"));
radio->setStyleSheet(QString::fromUtf8("QPushButton#radio{\n"
" border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #0f3f5c, stop: 1 #0a354e);\n"
"}\n"
"\n"
"QPushButton#radio:pressed{\n"
" color: #8a9fac; \n"
" border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #adcbd9, stop: 1 #fff);\n"
"}"));
radio->setFixedHeight(80);
radio->setFont(sansFont);
QPushButton *news = new QPushButton("NEWS");
news->setObjectName(QString::fromUtf8("news"));
news->setStyleSheet(QString::fromUtf8("QPushButton#news{\n"
" border: 1px solid #333; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #0f3f5c, stop: 1 #0a354e);\n"
"}\n"
"\n"
"QPushButton#news:pressed{\n"
" border: 1px solid #333; \n"
" color: #8a9fac; \n"
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #adcbd9, stop: 1 #fff);\n"
"}"));
news->setFixedHeight(80);
news->setFont(sansFont);
// Setup button layouts
QVBoxLayout *buttonLayout = new QVBoxLayout(bgWidget);
buttonLayout->setContentsMargins(0,150,0,3);
buttonLayout->setSpacing(3);
buttonLayout->addWidget(video);
buttonLayout->addWidget(photo);
buttonLayout->addWidget(radio);
buttonLayout->addWidget(news);
bgWidget->setLayout(buttonLayout);
// Setup main layout
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->setContentsMargins(0,0,0,0);
mainLayout->addWidget(bgWidget);
this->setLayout(mainLayout);
To copy to clipboard, switch view to plain text mode
Bookmarks