I created a popup window like this:
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();
}
I have three questions:
- When the window pops up I can't see the whole text, just a part of the first line of the label. How can I show the whole text?
- The frame is closed when clicking anywhere at the screen. How do disable this "anywhere-click-close" and create a pushbutton or a kind of cross that closes the frame/window?
- How do I fit the text right into the label and the label right into the frame?
I searched in the Qt Doc and also googled, but did not find the solutions. greetings