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

QIcon: Cannot load icon dialog-question from theme



  • Hello!

    I get this warning to the command line from my Qt4 app:
    @QIcon: Cannot load icon dialog-question from theme@

    It's caused by this snippet:
    @QMessageBox *messbox = new QMessageBox(QMessageBox::Question, "title", "text",
    QMessageBox::Yes | QMessageBox::No);@

    In spite of it, question picture is displayed. How can I get rid of this warning?

    Environment:
    Red Hat 6.2
    Qt 4.8.3


  • Lifetime Qt Champion

    Hi,

    Might sound silly but: add that icon to your current desktop theme



  • Thanks for reply, could you give me a little more info about this idea?


  • Lifetime Qt Champion

    You linux environment is using a them containing a set of icons (think of KDE's Oxygen) to use for e.g. print button, message dialog etc… Yours seem to missing that icon so it loads a default one. The message in itself is harmless.


Log in to reply