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. QtCreator -- Making Qt Creator find other sources when using Signals/Slots, and deploying for Win..
Forum Updated to NodeBB v4.3 + New Features

QtCreator -- Making Qt Creator find other sources when using Signals/Slots, and deploying for Win..

Scheduled Pinned Locked Moved Qt Creator and other tools
9 Posts 2 Posters 3.7k 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.
  • R Offline
    R Offline
    RichardM198030
    wrote on last edited by
    #1

    Hello, I recently been using just plain cpp files, and decided to just use QtCreator, and when I go to make an Options.cpp and Options.h file, and gave a class name of Options, it doesn't detect my Options class name, I've included my Options.h file in the TExtEditor.h file, and Options doesn't appear in the drop-down menu within Slots section, can anybody help here? Also, I couldn't find any how-to's on making qt compile for Win , I use Arch Linux, how can I compile for Win, if I don't use it? I have a friend who said he'd like to give my apps a go, and doesn't want to download Qt, so is there any way I can compile it on Arch, and then zip it up for him? Wished I could be more specific, but I have no way of explaining it any other way, and have no error messages. Thanks in advance, =).

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      If you already have files with code, it's not necessary to create a new class with Creator. Just add the files to the project file (.pro file, variables SOURCES and HEADERS).

      Regarding the windows build: You want to cross compile, should be possible with MinGW. I do not have any experience with that, maybe some others can give you some hints. If you do not have a windows box at your hand then good luck with finding errors in your deployment package. That's no fun even if you're sitting right in front of windows, let alone try-and-error on some remote box.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RichardM198030
        wrote on last edited by
        #3

        [quote author="Volker" date="1298210960"]If you already have files with code, it's not necessary to create a new class with Creator. Just add the files to the project file (.pro file, variables SOURCES and HEADERS).

        Regarding the windows build: You want to cross compile, should be possible with MinGW. I do not have any experience with that, maybe some others can give you some hints. If you do not have a windows box at your hand then good luck with finding errors in your deployment package. That's no fun even if you're sitting right in front of windows, let alone try-and-error on some remote box.[/quote]

        That's what I mean, I added an Options.cpp Options.h file, I tried to use the actionOptions Menu Item clicked event to the Options class, it doesn't detect it, I just started over and just going to use my custom sources, no biggie, =). Are you familiar with QTabWidget?? I can't quite understand it.. I even used QtCreator to check what it did, no clue on that one, as in, I didn't understand it..

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          It would be helpful, if you could provide us the content of Options.h and Options.cpp (use pastebin, if it's too big).

          Regarding the QTabWidget, please open a new thread with the actual question you have. It's not quite hard to use. Also, look at the examples in the Qt sources.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • R Offline
            R Offline
            RichardM198030
            wrote on last edited by
            #5

            [quote author="Volker" date="1298211613"]It would be helpful, if you could provide us the content of Options.h and Options.cpp (use pastebin, if it's too big).

            Regarding the QTabWidget, please open a new thread with the actual question you have. It's not quite hard to use. Also, look at the examples in the Qt sources.[/quote]

            Yeah, it's kinda late.. But I'll include what I did have in the source files..

            @
            #ifndef OPTIONS_H
            #define OPTIONS_H

            #include <QMainWindow>

            class Options : public QMainWindow
            {
            Q_OBJECT

            public:
            Options();

            private:

            };

            #endif // end of Options .h

            #include "Options.h"
            #include <QtGui>

            Options::Options()
            {

             setWindowTitle(tr("Set your options));
             setGeometry(350, 350, 700, 800);
            

            }

            // end of Options.cpp
            @

            I just made the class H and CPP Files, just for now, later I'll edit them..

            in the TextEditor.h file I have this : Options *options;
            #include "Options.h"; // also
            in the TextEditor.cpp file I have this : options = new Options();

            Any clues why QtCreator doesn't put Options in the dropdown when in the signals slots pane?

            [EDIT: code formatting, pleas use @-tags, Volker]

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              I do not understand, what you want to do. If I add the two files, everything is perfectly ok here.

              Can you make some screenshot(s) and describe what you expect to appear where?

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • R Offline
                R Offline
                RichardM198030
                wrote on last edited by
                #7

                [quote author="Volker" date="1298223298"]I do not understand, what you want to do. If I add the two files, everything is perfectly ok here.

                Can you make some screenshot(s) and describe what you expect to appear where?[/quote]

                yeah, sorry about that, I deleted those files a while ago..

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  sigh...

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    RichardM198030
                    wrote on last edited by
                    #9

                    [quote author="Volker" date="1298236788"]sigh...[/quote]

                    Sorry, if you have the rights, you can close this post.

                    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