I need to create QDialog-based control with custom title and close button. Simple way is to add some methods for controlling title and close button, but I want to have a possibility to style subcontrols through qss ::title and ::close-button selectors, which are already defined for QDockWidget. I want to do something like the following:
MyDialog::title {
subcontrol-origin:margin;
subcontrol-position:left;
color: white;
.... etc....
}
MyDialog::close-button {
subcontrol-origin:margin;
subcontrol-position:right;
image: url(./img.png);
.... etc....
}
MyDialog::title {
subcontrol-origin:margin;
subcontrol-position:left;
color: white;
.... etc....
}
MyDialog::close-button {
subcontrol-origin:margin;
subcontrol-position:right;
image: url(./img.png);
.... etc....
}
To copy to clipboard, switch view to plain text mode
Is it possible at all ?
Bookmarks