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. Designer plugin which interface to get the widget promoted to?
Qt 6.11 is out! See what's new in the release blog

Designer plugin which interface to get the widget promoted to?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 707 Views 1 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #1

    Hi
    Im working on promotionWidget that can show info on the form about the widget its promoted to.

    However, I have small issue finding the interface that supply this info.

    The DesignerPromotionInterface::PromotedClass
    does contain all promoted widgets but I fail to see how i can know for a instance which entry it belongs to
    alt text

    Also the QDesignerWidgetDataBaseItemInterface contains the all the info, also if its promoted but I cannot see
    any method of getting the name of the class promoted to. (mywidget/mywidget2)
    Also the objectname seems not to be used for the list so i could use that to get promoted class for an instance.

    The Object inspector knows, so its here somewhere. :)

    Anyone, have a hint?

    ps. i have used WorldClock example as base, hence the name ;)

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

      Sorry. Was as a case of "need to clean" build folder. then it worked :)

      The QDesignerWidgetDataBaseInterface has indexOf
      int itemindex = db->indexOfObject(this);

      1 Reply Last reply
      4

      • Login

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