QToolButton text and image position set // help me
-
I want to decorate the buttons in the form shown below.

But I could not solve one problem.
I have to specify the position of the image and text, I found something similar, but I did not want it.// rooms is QToolButton. rooms.at(roomIndex)->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); rooms.at(roomIndex)->setIconSize(imageSize); rooms.at(roomIndex)->setIcon(image);This source code is placed at the top of the image and the text at the bottom. I want to reverse the position.
So, what I want is for the text to be at the top and the image to be at the bottom.How can I solve this problem?
Please help me. -
I want to decorate the buttons in the form shown below.

But I could not solve one problem.
I have to specify the position of the image and text, I found something similar, but I did not want it.// rooms is QToolButton. rooms.at(roomIndex)->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); rooms.at(roomIndex)->setIconSize(imageSize); rooms.at(roomIndex)->setIcon(image);This source code is placed at the top of the image and the text at the bottom. I want to reverse the position.
So, what I want is for the text to be at the top and the image to be at the bottom.How can I solve this problem?
Please help me.@Kycho said in QToolButton text and image position set // help me:
setToolButtonStyle
U cannot do this with only
QToolbuttonbecause thesetToolButtonStyledoes not have the option http://doc.qt.io/qt-5/qt.html#ToolButtonStyle-enum.
Alternately u can design with with aQLabelon top ofQToolbuttonwithin layout.