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

Debug Mode Issue with QList Initialization

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 6.6.0
    • None
    • Windows

    Description

      I get an error in debug mode:

      int main(int argc, char* argv[])
      {
          QApplication a(argc, argv);
          QSplitter* s = new QSplitter;
          s->addWidget(new QWidget);
          s->addWidget(new QWidget);
          s->setSizes({1, 1});
          return a.exec();
      } 

       

      If I changed code to this, my code complie success:

      int main(int argc, char* argv[])
      {
          QApplication a(argc, argv);
          QSplitter* s = new QSplitter;
          s->addWidget(new QWidget);
          s->addWidget(new QWidget);
          QList<int> sizes = {1, 1};
          s->setSizes(sizes);
          return a.exec();
      } 

      I guess QList have changed in Qt6.6.0([What's New in Qt 6.6 | Qt 6.6|https://doc.qt.io/qt-6/whatsnew66.html]),

      this is a feature or a bug?

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            peiqi.liu Peiqi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes