Setting an icon's size on a QPushButton through Stylesheets
-
Hi. I'm trying to set an icon's size on a QPushButton through Stylesheets. I am unable to locate the proper syntax that would allow me to modify the icon's size when I implement the icon image from the stylesheet.
This is my code, based on this suggestion. Adjusting the size to 64 or 256 did not change the size of the object.
"QPushButton#pushButton_Calibration {image: url(:/images/toolkit_" + textColor + ".png); qproperty-iconSize: 128px;}"This is my other code, based on this other suggestion. Adjusting the width/height to 64 or 256 did not change the size of the object.
"QPushButton#pushButton_Calibration {image: url(:/images/toolkit_" + textColor + ".png); width: 128px; height: 128px;}"I am aware that something like this is an option:
ui->pushButton_Calibration->setIconSize(QSize(128, 128));But I am unsure on how to implement this to something with the format QPushButton#pushButton_Calibration.
Please let me know if more information is required to solve this issue. I am unfamiliar with the syntax needed to change the size of the icon and haven't been able to locate it from the documentation.