Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qtcreator load custom widget plugin failed
Qt 6.11 is out! See what's new in the release blog

Qtcreator load custom widget plugin failed

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 3 Posters 667 Views 2 Watching
  • 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.
  • A Offline
    A Offline
    Anqi
    wrote on last edited by
    #1

    Hi:
    I'm new to qt, I create a qt custom widget.In the slot function i init a QSerialPortInfo .
    like this: QSerialPortInfo info(ui->serialPortInfoListBox->itemText(idx));
    the qtcreator can't load this custom widget plugin if this code in any slot function . when i marked this line the qtcreator can load the plugin successfully.

    • when load the custom widget plugin, every slot function will be called?
    • calss QSerialPortInfo can't be init in custom widget plugin?
      Thanks!
    mrjjM 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What platform are you developing on ?
      What version of Qt Creator are you using ?
      What version of Qt are you using for that plugin?
      Did you build Qt Creator yourself ?

      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
      1
      • A Anqi

        Hi:
        I'm new to qt, I create a qt custom widget.In the slot function i init a QSerialPortInfo .
        like this: QSerialPortInfo info(ui->serialPortInfoListBox->itemText(idx));
        the qtcreator can't load this custom widget plugin if this code in any slot function . when i marked this line the qtcreator can load the plugin successfully.

        • when load the custom widget plugin, every slot function will be called?
        • calss QSerialPortInfo can't be init in custom widget plugin?
          Thanks!
        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Anqi
        Adding to @SGaist

        • when load the custom widget plugin, every slot function will be called?
          No. Creator/Desiner calls the QDesignerCustomWidgetInterface meta functions
          bool isContainer() const override;
          bool isInitialized() const override;
          QIcon icon() const override;
          QString domXml() const override;
          QString group() const override;
          QString includeFile() const override;
          QString name() const override;
          QString toolTip() const override;

        but unless you hooked your slots up to some signals that triggers during load,
        it wont call any slots as such.

        • class QSerialPortInfo can't be init in custom widget plugin?
          You can use any class as you normally would.
          No restriction as such.
        1 Reply Last reply
        2

        • Login

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