I'm using a QMessageBox to show a pop-up text message on the mainwindow on my application.
I've enabled the 'NoIcon' option and am seeing that the message text is not centred.
Is there a way to centre the text within the widget. I assume the Icon widget is still taking up space within the QMessageBox, is there a way to hide the icon entirely?
Attachment 13621
Code example below
Code:
messageBox = new QMessageBox(QMessageBox::NoIcon, QString(), messageText, QMessageBox::NoButton, this, Qt::FramelessWindowHint); messageBox->setText(messageText); color:rgb(0,0,0); \ font-size: 30px; \ QMessageBox { border-color: rgb(0, 0, 0); \ border-style: solid; \ border-width: 3px; }")); messageBox->exec();