Heyoo!
I'm trying to set my QToolButton Style to ToolButtonIconOnly, but nothing happens.
What am I forgetting?
In the attached image, My button has the border- which I'd like to remove. I would like it to look like the icons just to the right of it. Is my Line 7 not correct?
try:
if c.toolTip().startswith("Flipbook this viewer"):
print c.toolButtonStyle()
snapshotToolButton.setBaseSize(16,16)
snapshotToolButton.
setIcon(QtWidgets.
QIcon("C:/Users/nfran/.nuke/icons/cameraIcon.png")) snapshotToolButton.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
snapshotToolButton.setToolTip("Take Snapshot")
c.parentWidget().layout().insertWidget(0,snapshotToolButton)
return c
except: pass
try:
if c.toolTip().startswith("Flipbook this viewer"):
print c.toolButtonStyle()
snapshotToolButton = QtWidgets.QToolButton()
snapshotToolButton.setBaseSize(16,16)
snapshotToolButton.setIcon(QtWidgets.QIcon("C:/Users/nfran/.nuke/icons/cameraIcon.png"))
snapshotToolButton.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
snapshotToolButton.setToolTip("Take Snapshot")
c.parentWidget().layout().insertWidget(0,snapshotToolButton)
return c
except: pass
To copy to clipboard, switch view to plain text mode
cameraIcon.jpg
Bookmarks