ソースを参照

added background for home widget

fiffty-50 4 年 前
コミット
1c4a7f06f3
5 ファイル変更17 行追加3 行削除
  1. 5 0
      homewidget.cpp
  2. 5 2
      homewidget.ui
  3. 2 1
      openLog.pro
  4. BIN
      themes/images/background_gradient.png
  5. 5 0
      themes/images/images.qrc

+ 5 - 0
homewidget.cpp

@@ -9,6 +9,11 @@ homeWidget::homeWidget(QWidget *parent) :
 {
     ui->setupUi(this);
     qDebug() << "homeWidget: Activated";
+    ui->backgroundLabel->clear();
+
+    //QPixmap pix("://background_gradient.png");
+    //ui->backgroundLabel->setPixmap(pix);
+    ui->backgroundLabel->setStyleSheet("background-color: rgba(13, 196, 254, 100);");
 }
 
 homeWidget::~homeWidget()

+ 5 - 2
homewidget.ui

@@ -15,9 +15,12 @@
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0">
-    <widget class="QPushButton" name="pushButton">
+    <widget class="QLabel" name="backgroundLabel">
      <property name="text">
-      <string>Home Screen - tbd</string>
+      <string>background</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignCenter</set>
      </property>
     </widget>
    </item>

+ 2 - 1
openLog.pro

@@ -7,7 +7,8 @@ CONFIG += c++11
 TARGET = openLog
 
 RESOURCES = themes/breeze.qrc \
-    themes/icons/icons.qrc
+    themes/icons/icons.qrc \
+    themes/images/images.qrc
 
 # The following define makes your compiler emit warnings if you use
 # any Qt feature that has been marked deprecated (the exact warnings

BIN
themes/images/background_gradient.png


+ 5 - 0
themes/images/images.qrc

@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/">
+        <file>background_gradient.png</file>
+    </qresource>
+</RCC>