Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Align QMenu icon and text with respect to list widget Item



  • I have two items in a list widget. The first one is a normal ListWidgetItem , the second one is a QMenu . As you can see in the image the QMenu is not aligned with the QListWidgetItem . How do i align the QMenu icon and text to look same as the list widget Item ?

    Screenshot 2020-08-15 at 4.33.44 PM.png



  • I tried the other way too , i.e. moving the icon and text of QListWidgetItem a bit to the left so that it aligns with QMenu, but wasn't able to do it . My end goal is to somehow align the two items .
    Interestingly i am noticing this problem in MAC . In windows the UI looks fine . In windows the list widget item is shifted to the left to align with QMenu .

    Screenshot 2020-08-15 at 6.30.28 PM.png


Log in to reply