Qtで作ってみた・・アナログ時計 其の1 画像の取得

こんにちは。川上です。
以前に、テスト的にスキルUpしたく作ったSwift,Kotli,VC++(MFC)でのアナログ時計Prjの感じを、Qtで作ってみよう。。っての事でした。
初めてのQtでやってみた「画像と文字の表示」のは・じ・ま・り。。
当初、
 ・ QGraphicsView + QGraphicsScene
 で、アナログ時計の背景画像と数文字を表示してみました。
 
 1.FormsにQGraphicsViewを貼り付け。
2 QGraphicsView + QGraphicsScene を使えれるように、巷の浮き葦草の知識より、
ー mainwindow.hー
| 1 2 3 | private:     Ui::MainWindow *ui;     QGraphicsScene Scene_; | 
を記述後、画像用メンバ変数を追記。
| 1 2 3 4 |     QImage baseImage;       // -- 底面画像     QImage l_HariImage;     // -- 長針画像     QImage s_HariImage;     // -- 短針画像     QImage byo_HariImage;   // -- 秒針画像 | 
3.画像用メンバ変数に画像の読み込み
 ー mainwindow.cpp ー
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | MainWindow::MainWindow(QWidget *parent)     : QMainWindow(parent)     , ui(new Ui::MainWindow) {     ui->setupUi(this);     // --- Clock Init --     makeClockBaseSetting(); } void MainWindow::makeClockBaseSetting() {     QSize sz = ui->graphicsView->frameSize();     // -- Imageの縦横サイズ     int bsWorH =  (sz.width() > sz.height() ? sz.height() : sz.width() - 20);     int width=bsWorH,height=bsWorH;     QString = strPath =":/new/prefix1/base_tokei.png";     baseImage = QImage (width,height,QImage::Format_ARGB32);     baseImage.load(strPath);     strPath =":/new/prefix1/long_hari.png";     l_HariImage = QImage (width,height,QImage::Format_ARGB32);     l_HariImage.load(strPath);     strPath =":/new/prefix1/short_hari.png";     s_HariImage = QImage (width,height,QImage::Format_ARGB32);     s_HariImage.load(strPath);     strPath =":/new/prefix1/byo_hari.png";     byo_HariImage = QImage (width,height,QImage::Format_ARGB32);     byo_HariImage.load(strPath); } | 
でした。
で最終的には、ぬかるみの道の彷徨いの末、一応、iPhone,Mac,Windows上での同一の動作が確認出来、こんなんになりますw。
 
ではでは。

