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. Find a issue when invoking QComboBox::setItemText on MacOS X
Forum Update on Monday, May 27th 2025

Find a issue when invoking QComboBox::setItemText on MacOS X

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 627 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.
  • M Offline
    M Offline
    MachoX
    wrote on last edited by
    #1

    The invocation is quite simple, like below:
    @
    QComboBox* combo = new QComboBox(parent);

    int index = combo->findData(Id);
    ...
    if(combo->itemText(index) == Id)
    {
    QString name = getNameById(Id);
    combo->setItemText(index, name);
    }
    @

    At runtime, I'll get the error message saying:
    "
    QObject::connect: Cannot queue arguments of type 'QVector<int>'
    (Make sure 'QVector<int>' is registered using qRegisterMetaType().)
    "

    As long as making the line "combo->setItemText(index, name);" an annotation with "//", the message will go away. Anybody there has the same question?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Pretty strange because the error seems to be completely unrelated to QComboBox.

      Do you use a QVector<int> anywhere in your program in a signal or slot signature ?

      Can you create a minimal compilable example from scratch that reproduces this ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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