First of all, I want to use QMessageBox subclass to embed a scroll area layout in between QMessageBox informative text and its button at the bottom. But the scroll area overlaps the icon like this
class CustomizedMessagebox(QMessageBox):
def __init__(self,parent,dic):
QMessageBox.__init__(self,parent)
self.setIcon(QMessageBox.Warning)
self.setText("Sample Warning Text Here")
scroll = QScrollArea(self)
scroll.setWidgetResizable(True)
self.content = QWidget()
scroll.setWidget(self.content)
lay = QVBoxLayout(self.content)
for item in [[1,2],[3,4],[5,6],[7,8],[9,0]]: #just for scroll able example list
lay.addWidget(QLabel("{} - {}".format(item[0],item[1]), self))
self.layout().addWidget(scroll, 1, 0, 1, self.layout().columnCount())
#self.setStyleSheet("QScrollArea{min-width:200 px; min-height: 200px}") #style that i want to add later on
self.addButton('Understood',self.AcceptRole)
So I decided to create QDialog instead, but I wonder how can I add QMessageBox.Warning icon (also including QMessagebox title and informative text styling) into QDialog, is it possible?. If not then how could I create distance between QMessagebox Icon and its text from the scroll area layout? (because it seems way simpler solution IMO), ps: I really want to minimize external media for icon since my app only does a simple task so that's why I'm really curious if I could take QMessagebox icon instead or if there's no other way I'll be following whatever it is.

