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. QtCreator GUI Designer exchange widget type
Qt 6.11 is out! See what's new in the release blog

QtCreator GUI Designer exchange widget type

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

    The GUI-Designer has the feature for some widget types to exchange it with an other type of widget.
    Context-menu of a widget "Morph into".

    F.e. QPushButton -> QCheckBox

    Now, have build my own Widget derive from the basic widget.
    E.e. QPushButton -> class AdvPushButton: public QPushButton

    I want to exchange most Buttons of my projects with the designer.
    The only practicalbe way I found to edit the *.ui files by hand in a text editor.
    Is there an easy way to do this?
    Can I enhance the widget exchange feature of the creator itself ?

    Axel SpoerlA 1 Reply Last reply
    0
    • Andy314A Andy314

      The GUI-Designer has the feature for some widget types to exchange it with an other type of widget.
      Context-menu of a widget "Morph into".

      F.e. QPushButton -> QCheckBox

      Now, have build my own Widget derive from the basic widget.
      E.e. QPushButton -> class AdvPushButton: public QPushButton

      I want to exchange most Buttons of my projects with the designer.
      The only practicalbe way I found to edit the *.ui files by hand in a text editor.
      Is there an easy way to do this?
      Can I enhance the widget exchange feature of the creator itself ?

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @Andy314
      To make the exchange feature work, you have to write a plug-in for the widget designer, dealing with your custom checkbox.
      However, if it’s a mass change, editing the XML is probably easier.
      Mind that this doesn’t change any of the slot names, should you have auto created ones.

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      1

      • Login

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