Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102628

Application will crash if setWindowsIcon with a big ICON

    XMLWordPrintable

Details

    • Linux/Wayland, Linux/X11
    • ebdaf8ef9c (qt/qtbase/dev) ebdaf8ef9c (qt/tqtc-qtbase/dev) 0e25f1a4da (qt/qtbase/6.3) 0e25f1a4da (qt/tqtc-qtbase/6.3) c80d89113d (qt/tqtc-qtbase/5.15) 96ce0721e6 (qt/tqtc-qtbase/6.2)

    Description

      check the attached example.
      If the img is large ,then the application will crash.

       QImage img(":/a.png");
      
      if (!img.isNull()) {
       // Load successful
      
      auto dictionaryIcon = QIcon(QPixmap::fromImage(img));
      
      //crash here.
       setWindowIcon(dictionaryIcon);
       }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              axelspoerl Axel Spoerl
              xiaoyifang yifang xiao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: