Issues with Qt Ui Editor
Unsolved
General and Desktop
-
Have as graphical and logical issues with qt ui editor.
- At first, when i start Qt and open ui editor, the table with elements not renderign properly. After expanding all in menu, it fixes,but after restarting Qt its happening again.
- Second and more critical bug, when i trying to connect QSlider with QLabel in ui editor, I get an error
no matching function for call to 'QObject::connect(QSlider&, void (QAbstractSlider::)(int), QLabel&, <unresolved overloaded function type>)'
There is the code that was generated by Qt
QObject::connect(indexSlider, &QSlider::valueChanged, label_2, &QLabel::setNum);
-
@Derker There are two overloads of QLabel::setNum(). Both could accept an int argument.
You need to tell Qt which to choose, something like this:
connect( indexSlider, &QSlider::valueChanged, slider, QOverload<int>::of(&QLabel::setNum) );
I cannot see a way to do that in Qt Designer (6.5.2) which clearly knows both slots exist, but only offers the setValue(int) variant once you select the valueChanged(int). The UI file results in
uic
producing the ambiguous code you posted.