QtCreator -- Making Qt Creator find other sources when using Signals/Slots, and deploying for Win..
-
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, =).
-
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 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..
-
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 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_OBJECTpublic:
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]
-
[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..
-
[quote author="Volker" date="1298236788"]sigh...[/quote]
Sorry, if you have the rights, you can close this post.