QToolButton not displayed correctly on KDE

Aaron Dewes aaron.dewes at web.de
Mon Feb 15 18:36:32 GMT 2021


I'm having some issues with a QT application I'm developing right now,
but only on KDE, the same code works perfectly on GNOME.

I'm using the following code snippet:

// In my header file
QAction *m_newTabAction;
QToolButton *addTabButton;
// The actual code
  m_newTabAction = newQAction(this);
connect(m_newTabAction, SIGNAL(triggered()), this, SLOT(newTab()));
addTabButton =new QToolButton(this);

Compiling and running this code (The button is positioned later) result
in the button being displayed and working, except the image not being
displayed. The image is displayed on GNOME though. This also has nothing
to do with dark mode, as the image contains black and white parts, and I
tested this using Breeze Light and Dark. I already tried setting the
icon and/or icon size directly on the button, which also didn't help. My
code is a fork of Arora, and the same issue shows up there too, and the
new tab button isn't displayed.

Am I using some outdated methods that KDE doesn't support or is there
anything I can do to get this code working properly?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20210215/6ba0509d/attachment.htm>

More information about the kde-devel mailing list