PDA

View Full Version : General qt days..



Y-Less
9th April 2008, 23:16
Yes attractive subject of this thread heh? So hard to get attention those days.. ;)

Anyways I got a couple of questions regarding QT (4.3.4)


I am using Notepad to create my source file's and my UI file's, Then I zip my src folder and qmake -makefile and mingw32-make my src folder to compile, then I take the EXE out of the folder and delete the src folder, Then I unzip my zip with a clean src folder .. All why I do that is because if I do not do that this way, I have a empty debug folder, a release folder with a lot of crap, and some makefile shit. Is there any way to put those generated makefiles, those moc files and those other compiled files in one folder to deleted afterwards after done compiling?

Is there any code to disable the maximize button? I gave my code somewhere a variable containing code that is saved in a XML file, Has nothing todo with the maximize button but I want it to get disabled

Is there any software or IDE to debug my QT Application? I compile my application without any error's from the command prompt but when I try to open my EXE, it goes wrong, it crashes just without even showing a screen..
It would be nice if somebody could answer this because I cannot debug my application right now and I cannot continue developing now..

Thank you, YLess.

maverick_pol
10th April 2008, 00:22
Hi,

I will be brief:

Is there any code to disable the maximize button
yes. See the QtDemo examples about setting window flags. Search the forum for related topics; I am 100% this kind of thread is present.

Is there any software or IDE to debug my QT Application
I personally use VS and eclipse for creating and managing Qt related code, but there is a bunch of other good-looking/easy-to-use IDEs. Look at QtCentre homepage or search the forum for related threads.

The forum contains a lot of useful data. Use it.

Kacper

Y-Less
10th April 2008, 01:19
Thank you for your fast response on my questions Kacper, I've searched before but ended up with the online documentation on Trolltech. That states a few things that cleared up my mind.


yes. See the QtDemo examples about setting window flags. Search the forum for related topics; I am 100% this kind of thread is present.
I assume that I need to put that code within this slot? (Correct me if I am wrong)


void MainWindow::initUI()
{
setWindowTitle("My application");
layout->addWidget(Qt::WindowMinimizeButtonHint);
}
I did not try my code on my application since my application does crash on opening.


I personally use VS and eclipse for creating and managing Qt related code, but there is a bunch of other good-looking/easy-to-use IDEs. Look at QtCentre homepage or search the forum for related threads.
I've seen eclipse and installed it, Tried it olso but I need some QT intergration to eclipse, I've looked on the Trolltech website, but they have the last build on 4.3.3, Can I still use that intergration pack?

Oh, and by the way, do you have any solution for those builded files that I do not need in my SRC folder, so I do not have to {zip and unzip} every time I want to rebuild. I'd like to have a clean src folder every time i've done compiling. Thanks.

spud
10th April 2008, 01:41
I assume you're working on windows, since you mentioned .exe's.
If you decide to use Visual Studio Express Edition(2005 or 2008) you get an IDE for free and all your temporary files end up in the "debug" or "release" folder.


void MainWindow::MainWindow()
{
setWindowFlags(Qt::WindowMaximizeButtonHint);
}

Y-Less
10th April 2008, 01:49
Thank you Spud, I'll try that code later.

I get another error in Eclipse while I try to debug my application, where do I know where my error comes up because I do not see any errors?

wysota
10th April 2008, 09:23
All why I do that is because if I do not do that this way, I have a empty debug folder, a release folder with a lot of crap, and some makefile shit. Is there any way to put those generated makefiles, those moc files and those other compiled files in one folder to deleted afterwards after done compiling?
How about just calling make clean or even make distclean? :)

Y-Less
10th April 2008, 17:42
I never trought about that, Thank you both for all kinda good answers.

If I got any other questions I'll return to the forums ;)

pherthyl
10th April 2008, 21:38
How about just calling make clean or even make distclean? :)

Another way is to specify in qmake where your temporary files will be placed. This is what I put in every pro file that I make:

OBJECTS_DIR = ./build
RCC_DIR = ./build
UI_DIR = ./build
MOC_DIR = ./build

So all the temporary generated crap gets put into the build directory, so the source code is kept clean, and the release folder just has the exe in it.

pherthyl
10th April 2008, 21:41
Is there any software or IDE to debug my QT Application? I compile my application without any error's from the command prompt but when I try to open my EXE, it goes wrong, it crashes just without even showing a screen..
[/list]It would be nice if somebody could answer this because I cannot debug my application right now and I cannot continue developing now..

Thank you, YLess.

Well some other people have suggested IDEs (VS, Eclipse), but you can also just do poor man's debugging and use qDebug() statements to figure out where your code is crashing. A lot of the time, that's just as fast.