KhamisiKibet / QT-PyQt-PySide-Custom-Widgets

Awesome custom widgets made for QT Desktop Applications. Simplify your UI development process. These widgets can be used in QT Designer then imported to PySide code.
https://khamisikibet.github.io/Docs-QT-PyQt-PySide-Custom-Widgets/
GNU General Public License v3.0
685 stars 211 forks source link

This problem causes the button icon not to switch automatically #94

Open newboykong opened 4 months ago

newboykong commented 4 months ago

AttributeError: 'PySide2.QtWidgets.QPushButton' object has no attribute 'setNewIcon' This problem causes the button icon not to switch automatically

ShannonPorter commented 4 months ago

I am running through the video how too and I'm getting the same issue, where a "QPushButton" outside the "QCustomSlideMenu" that is being changed by the "QCustomSlideMenu" code in the style.json file is having this error returned;

self.targetBtn.setNewIcon(QtGui.QIcon(self.targetBtn.menuCollapsedIcon)) AttributeError: 'PySide6.QtWidgets.QPushButton' object has no attribute 'setNewIcon'

There are 2 different selections of the demo video that has this issue. Is this me, or is it a bug? Has anyone found a fix for this yet, or am I missing something?

KhamisiKibet commented 4 months ago

Update your custom Widgets module

On Tue, Mar 5, 2024, 1:34 AM Shannon Porter @.***> wrote:

I am running through the video how too and I'm getting the same issue, where a "QPushButton" outside the "QCustomSlideMenu" that is being changed by the "QCustomSlideMenu" code in the style.json file is having this error returned;

self.targetBtn.setNewIcon(QtGui.QIcon(self.targetBtn.menuCollapsedIcon)) AttributeError: 'PySide6.QtWidgets.QPushButton' object has no attribute 'setNewIcon'

There are 2 different selections of the demo video that has this issue. Is this me, or is it a bug? Has anyone found a fix for this yet, or am I missing something?

— Reply to this email directly, view it on GitHub https://github.com/KhamisiKibet/QT-PyQt-PySide-Custom-Widgets/issues/94#issuecomment-1977586065, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATSYXNI46KLIRQOIABEQIC3YWTZHXAVCNFSM6AAAAABDLPTNL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZXGU4DMMBWGU . You are receiving this because you are subscribed to this thread.Message ID: <KhamisiKibet/QT-PyQt-PySide-Custom-Widgets/issues/94/1977586065@ github.com>

ShannonPorter commented 4 months ago

Well that worked... I thought I was running on the latest version as I only installed it 5 days ago, but apparently I was wrong. Thank you for the quick reply.