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

uic and overloaded slots

XMLWordPrintable

    • All
    • 2ec2c54e0 (dev), 9fef654cc (6.7), ae502ec39 (tqtc/lts-6.5)

      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);

      ^

       

       

        1. qtbug93413.zip
          3 kB
          Friedemann Kleint
        2. test-qlabel.tar.gz
          4 kB
          Ilya Kotov
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            axelspoerl Axel Spoerl
            trialuser02 Ilya Kotov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes