Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issues with Qt Ui Editor
Forum Update on Monday, May 27th 2025

Issues with Qt Ui Editor

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 265 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Derker
    wrote on 11 Sept 2023, 19:20 last edited by Derker 9 Nov 2023, 19:24
    #1

    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. table bug
    • 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);
    

    connecting QSlider with QLabel Error

    C 1 Reply Last reply 12 Sept 2023, 06:28
    0
    • D Derker
      11 Sept 2023, 19:20

      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. table bug
      • 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);
      

      connecting QSlider with QLabel Error

      C Offline
      C Offline
      ChrisW67
      wrote on 12 Sept 2023, 06:28 last edited by ChrisW67 9 Dec 2023, 06:39
      #2

      @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.
      2a4e97a3-4943-41fe-824e-67c6e3b64e7b-image.png

      D 1 Reply Last reply 12 Sept 2023, 09:30
      1
      • C ChrisW67
        12 Sept 2023, 06:28

        @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.
        2a4e97a3-4943-41fe-824e-67c6e3b64e7b-image.png

        D Offline
        D Offline
        Derker
        wrote on 12 Sept 2023, 09:30 last edited by
        #3

        @ChrisW67 So, its better to connect elements by my self, instead of using ui editor? Because in qt 5.14 everything works fine, and i don’t get any of these bugs…

        1 Reply Last reply
        0

        1/3

        11 Sept 2023, 19:20

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved