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

uic and overloaded slots

    XMLWordPrintable

Details

    • All
    • 2ec2c54e0 (dev), 9fef654cc (6.7)

    Description

      uic uses new signal/slots syntax but does not use qOverload template. For example, uic produces uncompilable code for forms with connection to QLabel::setNum(int) slot. See attached example.

      Compilation error:

      In file included from mainwindow.cpp:4:0:

      ui_mainwindow.h: In member function ‘void Ui_MainWindow::setupUi(QMainWindow*)’:

      ui_mainwindow.h:71:90: error: no matching function for call to ‘QObject::connect(QSlider*&, void (QAbstractSlider::)(int), QLabel&, <unresolved overloaded function type>)’

      QObject::connect(horizontalSlider, &QSlider::valueChanged, label, &QLabel::setNum);

      ^

       

       

      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
              trialuser02 Ilya Kotov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change