Important: Please read the Qt Code of Conduct -

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.>setToolButtonStyle(Qt::ToolButtonTextUnderIcon);>setIconSize(imageSize);>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:


    U cannot do this with only QToolbutton because the setToolButtonStyle does not have the option
    Alternately u can design with with a QLabel on top of QToolbutton within layout.

  • Thank you for your reply.

Log in to reply