Reputation: 3203
I meet the problem, so I take a test at MainWindow, the problem remains the same. Here is the code in "MainWindow::MainWindow(QWidget *parent)..."
QToolButton* bt = new QToolButton(this);
bt->setIcon(QIcon(":/te.png"));
bt->setToolButtonStyle(Qt::ToolButtonIconOnly);
bt->show();
It looks like:
My resource file is like this:
Upvotes: 2
Views: 2958
Reputation: 22346
You have given the icon an alias te
but called the icon by it's full name te.png
. Use :/te
instead.
Upvotes: 4