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. [Solved] Drag & Drop Widget Designer Application

[Solved] Drag & Drop Widget Designer Application

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 4.1k 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.
  • M Offline
    M Offline
    Mammamia
    wrote on last edited by
    #1

    Hi all,
    I am trying to create a custom designer in which i will have my own custom widgets which are created using QML & C++. My Widget Designer will have drag & Drop property. User can create a new form and drag & Drop these widgets into it.. Now i am able to do this, its working fine. Next thing i need is to do is re-sizing these widgets(similar to the re-sizing option in Qt Designer). Here i am attaching the sample style in which i need the selecting and re-sizing rectangle...So when i click on any of my widget it should display that rectangular boarder for re-sizing these widgets..

    Please help me to solve this problem..
    Thank you..

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Why don't you integrate your widgets into the Qt Designer?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mammamia
        wrote on last edited by
        #3

        Qt Designer is not an option for me.... I need to make my own designer so many additional features i need to add to my designer...I know that i can integrate new widgets in qt designer, but i don't want to use that...

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Well, if you're that sure that QtDesigner isn't a good starting point for you, perhaps you can still look at its source code for inspiration on how it works?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mammamia
            wrote on last edited by
            #5

            Actually i took a look at the Qt Designer code. But they were using some classes which can only be used for modifying the existing Qt Designer. Such as adding new widgets to the designer. They are using different approach for the designer. Only thing i need to know how can i re-size the widgets at run time by using a frame selecting that particular widget (same as the blue selection available in Qt Designer.) "Please check this post...":http://www.qtforum.org/article/38498/designer-application.html?s=72fe4d50cba3f4274a075144f348ec0b1c39ba9c .

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mammamia
              wrote on last edited by
              #6

              Is there any way to do this by using normal QWidget architecture......
              Anyone know about how did they implemented "resize handles" in the Qt Designer... i Searched the entire Qt Designer code,but no use, I didn't find the code how did they implemented that re-size handles in that..... AFAIK they used purely QWidget based code for that and not using QGraphicsView framework.....

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #7

                Indeed. From building a Qt Designer plugin at one point that needed to display the widget differently in designer mode than it did when running in a normal application, I learned that designer inserts a lot of other widgets in the object tree when running in design mode. My guess is, that the resize handles are actually rendered by some sort of container widget that is placed around each of the normal widgets (as in: the normal widget is created as a child widget of the container widget that is responsible for the resize handles). However, I did not verify this in the source code, it is just a hunch that I got from inspecting the object tree for my plug in widget.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Mammamia
                  wrote on last edited by
                  #8

                  At last i have got the solution how to do it.... I dig the Qt Designer code very hard and found out how did they do that by using QWidget method. I am really happy to get it working. Thanks for all who gave me suggestions... They have done this by using WidgetHandle class & WidgetSelection class which you can find in the designer source code.... Hope this will help others too.....

                  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