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] ui_*.h files generated in wrong directory
Forum Updated to NodeBB v4.3 + New Features

[Solved] ui_*.h files generated in wrong directory

Scheduled Pinned Locked Moved General and Desktop
12 Posts 2 Posters 11.0k 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.
  • S Offline
    S Offline
    SumRandomGuy
    wrote on last edited by
    #3

    That makes sense. What can I do so I don't have to copy them to the project directory to get the updates when I build?

    If I don't copy the ui_*.h files to my project directory, my UI never sees the changes I make. I can change a label's text but unless I copy those files, my app still has the old text.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SumRandomGuy
      wrote on last edited by
      #4

      I should also mention that if I just delete the ui_*.h files from my project directory and expect the ones in the build directory to be chosen, it fails to find them at all. It just isn't looking in the build directory for these files at all.

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

        what do your #include statements for the ui_*.h look like? Anything strange in your .pro file?

        Does re-running qmake after you make a change help things?

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SumRandomGuy
          wrote on last edited by
          #6

          Here's the .pro file:

          @#-------------------------------------------------

          Project created by QtCreator 2012-11-12T11:57:23

          #-------------------------------------------------

          QT += core gui sql

          greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

          TARGET = TheDirector
          TEMPLATE = app

          SOURCES += main.cpp
          mainwindow.cpp
          accountdetails.cpp
          botprofile.cpp
          aboutbox.cpp
          editallprofiledetails.cpp
          editdirectorsettings.cpp
          botsettings.cpp
          autorundelegate.cpp

          HEADERS += mainwindow.h
          accountdetails.h
          botprofile.h
          aboutbox.h
          editallprofiledetails.h
          editdirectorsettings.h
          botsettings.h
          autorundelegate.h

          FORMS += mainwindow.ui
          accountdetails.ui
          aboutbox.ui
          editallprofiledetails.ui
          editdirectorsettings.ui

          #UI_DIR = ui

          RESOURCES +=

          win32 {
          QMAKE_LFLAGS += -static
          CONFIG += -no-exceptions
          } else {
          }
          @

          and the includes aren't anything special. Here's the entirety of one of the .cpp files:
          @#include "editallprofiledetails.h"
          #include "ui_editallprofiledetails.h"

          EditAllProfileDetails::EditAllProfileDetails(QWidget *parent) :
          QDialog(parent),
          ui(new Ui::EditAllProfileDetails)
          {
          ui->setupUi(this);

          this->AllProfileDetailsModel = new QSqlTableModel(this, QSqlDatabase::database("DirectorDB"));
          AllProfileDetailsModel->setTable("profiles");
          AllProfileDetailsModel->select();
          ui->tblAllProfiles->setModel( AllProfileDetailsModel );
          

          }

          EditAllProfileDetails::~EditAllProfileDetails()
          {
          delete ui;
          }
          @

          Running qmake doesn't change anything for me. It happens the same whether I build from within Qt Creator or via the command line manually.

          Odd, huh?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SumRandomGuy
            wrote on last edited by
            #7

            Resources are doing the same thing to me. I can't add resources because it doesn't find them in the right directory to be linked.

            When I create a new object, I have copy files for the code-completion thing to work.

            I have workarounds but would love to know if there's a configuration option I've set wrong. I should say that this is a new install. It's not like it was working, then stopped, so it's likely something I'm doing wrong.

            It happens on my Windows and my Mac environment.

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

              You're not, by chance, sharing the .pro.user file across platforms, are you?

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SumRandomGuy
                wrote on last edited by
                #9

                Yes. I've been copying the directory over when I want to develop on a different machine.... That's bad, huh?

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mlong
                  wrote on last edited by
                  #10

                  Yeah, the .pro.user file is specific to one particular instance of Creator and is not portable between systems, users, platforms, or whatever. Sharing it is a Bad Idea. Try getting rid of it and see if your problems still exist.

                  Software Engineer
                  My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SumRandomGuy
                    wrote on last edited by
                    #11

                    That resolved it. Thanks!

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mlong
                      wrote on last edited by
                      #12

                      Good deal! Be sure and edit the thread title to add [Solved]. Thanks!

                      Software Engineer
                      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                      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