Results 1 to 2 of 2

Thread: Promote Button does not appear in "Promoted Widgets" Dialog

  1. #1
    Join Date
    Jun 2012
    Posts
    202
    Thanks
    22
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Promote Button does not appear in "Promoted Widgets" Dialog

    I know I'm doing something stupid, but I can't figure it out.

    I'm trying to used a placeholder (e.g. List Widget) in QtCreator 4.4.1 for a custom class QCustomPlot. The header and .cpp files for QCustomPlot exist

    s1.JPG

    When I click add, the promoted class name shows in the upper window, but there is no "Promote" button to push:

    s2.JPG

    I've tried different things for the place holder, and have tried checking "global include", but the promote button never appears.

    Any help?


    Added after 18 minutes:


    Found a work-around--

    I copy pasted the custom widget from a QtCreator session for another project.
    Last edited by davethomaspilot; 6th August 2022 at 14:04.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,138
    Thanks
    294
    Thanked 852 Times in 839 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Promote Button does not appear in "Promoted Widgets" Dialog

    I copy pasted the custom widget from a QtCreator session for another project.
    Open the XML .ui file in a text editor and look at how the custom widget insertion is implemented. There will be a section in the place where the widget appears in the UI hierarchy of layouts, and then a section at the bottom which tells the UIC compiler where to find the header file for the custom widget.

    If you are brave, the next time you need to do this you can insert the list widget (or label or whatever) and then make those same edits to the .ui file (after having made a copy first). I've done that for QCustomPlot and other widgets.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 5
    Last Post: 30th April 2016, 23:29
  2. Replies: 2
    Last Post: 20th September 2013, 22:47
  3. Replies: 3
    Last Post: 8th December 2011, 19:21
  4. Replies: 4
    Last Post: 20th July 2011, 11:37
  5. Replies: 2
    Last Post: 20th March 2010, 18:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.