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. Can't drag and drop widgets onto UI
Forum Updated to NodeBB v4.3 + New Features

Can't drag and drop widgets onto UI

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 3 Posters 1.3k 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.
  • K Offline
    K Offline
    krstemee
    wrote on last edited by
    #1

    I've created a new item in the Action Editor box, and I'm trying to drag and drop them onto the mainwindow UI, but it's not letting me. Does anyone know why this is?

    Also, when I drag and drop a widget, i.e a button onto the UI, it doesn't show when I build and run it. Why is this?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Please provide more information - where do you want to drag'n'drop something?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

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

        Hi
        If you change the UI file by adding a new widget and it still sort of shows the old GUI when run,
        the often seen cause is that some of the build files (from the build directory ) is
        placed in the project folder. Make sure there are no build files in the project folder .

        1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          Please provide more information - where do you want to drag'n'drop something?

          K Offline
          K Offline
          krstemee
          wrote on last edited by
          #4

          @Christian-Ehrlicher I've included an image because I think showing you a picture would make a lot more sense than me trying to explain it.
          Screen Shot 2020-12-31 at 7.34.09 PM.png

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

            Hi
            You can only drag Actions to the Main Menu (file) or the tool bar.
            Actions are non visual so if you could drag to center of the GUI, it would not make much sense. :)

            K 1 Reply Last reply
            2
            • mrjjM mrjj

              Hi
              You can only drag Actions to the Main Menu (file) or the tool bar.
              Actions are non visual so if you could drag to center of the GUI, it would not make much sense. :)

              K Offline
              K Offline
              krstemee
              wrote on last edited by
              #6

              @mrjj Ah, I see. I was following a tutorial on YT and the guy was able to do it, so I was just confused. Maybe older versions?

              Anyhow, I'm sorry to post another question here like this, but it's sort of related. When I drag and drop widgets like a button onto the UI, when I compile it, it doesn't show in the window. Do you know why this is happening?

              mrjjM 1 Reply Last reply
              0
              • K krstemee

                @mrjj Ah, I see. I was following a tutorial on YT and the guy was able to do it, so I was just confused. Maybe older versions?

                Anyhow, I'm sorry to post another question here like this, but it's sort of related. When I drag and drop widgets like a button onto the UI, when I compile it, it doesn't show in the window. Do you know why this is happening?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #7

                @krstemee
                Hi
                Are you sure he didnt drag to the top menu ?
                Do you have link to video ? Just curious of what you saw :)

                • When I drag and drop widgets like a button onto the UI, when I compile it, it doesn't show in the window.

                Well the normal cause i have seen is that for some reason some of the build files got into the project folder
                ( and it will see them first and use the old)

                So check the project folder ( where the .pro file is) for any files looking like

                alt text

                especially any ui_xxxxx files as they are generated and should not be in the project folder.

                Also check project that the build folder is not pointing to the project folder
                alt text

                Pro tip :)
                You can right click a file to go directly to it
                alt text

                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