ポップアップウィンドウ。全文コンテンツと他の2つの質問を表示する方法

StackOverflow https://stackoverflow.com//questions/9675435

  •  12-12-2019
  •  | 
  •  

質問

このようなポップアップウィンドウを作成しました:

QFileInfo FileA = "AAA";  
QFileInfo FileB = "BBB";   

if (fileA.exists() == false & (fileB.exists() == false))
      {
          QFrame* PopupWin = new QFrame(this, Qt::Popup | Qt::Window  );
          PopupWin->setGeometry(450,450, 400, 200);
          PopupWin->setLineWidth ( 3 );
          PopupWin->setMidLineWidth ( 1 );
          PopupWin->setFrameStyle ( QFrame::Box | QFrame::Raised);
          QLabel *message = new QLabel(PopupWin);
          message->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
          message->setGeometry(100,50, 200, 100);
          message->setText("blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                             "bluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu"
                             "bliiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"
                             "bleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
                             "bloooooooooooooooooooooooooooooooooooooooooooooo");
          PopupProzess->show();

      }
.

私は3つの質問をしています:

  • ウィンドウがポップアップすると、テキスト全体が表示されない、の一部だけ ラベルの最初の行テキスト全体を表示する方法
  • クリックするとフレームが閉じられます 画面上のどこでも。この「alherwhere-close-close」を無効にする方法 そして、プッシュボタンやクロスの一種の十字を作成します。 フレーム/ウィンドウ?
  • テキストをレーベルとラベル権利に合わせる方法 フレーム内に?

QT DOCを検索し、またGOOGLEDを検索しましたが、ソリューションは見つかりませんでした。挨拶

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top