我创建了一个这样的弹出窗口:
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();
}
我有三个问题:
- 当窗口弹出时,我看不到整个文本,只能看到标签第一行的一部分。我怎样才能显示整个文本?
- 单击屏幕上的任意位置时,框架会关闭。如何禁用此“任何地方单击关闭”并创建一个按钮或一种关闭框架/窗口的十字?
- 如何将文本直接放入标签并将标签放入框架?
我在 Qt Doc 中搜索并搜索,但没有找到解决方案。问候