Page 2 of 4

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Mon Oct 10, 2011 4:13 am
by YankzzDev
i am using visual studio 2008 to do it, not code block.. can you help me? i really need it..

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Mon Oct 10, 2011 4:59 pm
by aanderse
you'd need to state the problems you are having before anyone can help you

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Tue Oct 11, 2011 6:04 pm
by Virion
YankzzDev wrote:it's work on windows? i want integration to windows
yes it works on windows

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Wed Oct 12, 2011 4:07 am
by YankzzDev
thank you for the reply...


i got a small error

cannot convert parameter 1 from 'QString' to 'const irr::io::path &'

because i have successful integrated with windows..

n i try to open a model example and import it to irrlicht engine..

i use the qt QFileDialog::getOpenFileName function to open the model file..

here is the code:

Code: Select all

 
QString filename = QFileDialog::getOpenFileName(this);
        ui->label->setText(filename);
 
and at the irrlicht code, i change this code:

Code: Select all

 
IAnimatedMesh* mesh = smgr->getMesh("sydney.md2");
 
to this code

Code: Select all

 
IAnimatedMesh* mesh = smgr->getMesh(filename);
 

and got this error

Code: Select all

 
1>.\mainwindow.cpp(43) : error C2664: 'irr::scene::IAnimatedMesh *irr::scene::ISceneManager::getMesh(const irr::io::path &)' : cannot convert parameter 1 from 'QString' to 'const irr::io::path &'
1>        Reason: cannot convert from 'QString' to 'const irr::io::path'
1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>Build log was saved at "file://d:\QT Project\1011irrlichtqt\debug\BuildLog.htm"
 
 
Can you help me solve this problem?

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Wed Oct 12, 2011 4:33 am
by aanderse
well... as your compiler tells you
you're passing the getMesh function a QString (filename) when it doesn't accept a QString, it accepts an io::path

you could pass qPrintable (filename) to getMesh instead of just filename and it should work

Code: Select all

IAnimatedMesh* mesh = smgr->getMesh(qPrintable (filename));

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Wed Oct 12, 2011 4:48 am
by YankzzDev
aanderse wrote:well... as your compiler tells you
you're passing the getMesh function a QString (filename) when it doesn't accept a QString, it accepts an io::path

you could pass qPrintable (filename) to getMesh instead of just filename and it should work

Code: Select all

IAnimatedMesh* mesh = smgr->getMesh(qPrintable (filename));

thank you very much.. it's work!!

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Wed Oct 12, 2011 6:36 am
by YankzzDev
hmmm, i have another question...


after i load the model, it's displayed on the screen, but i load another model, it's displayed 2 model with selected one and previous one...

how i can clear the previous one?

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Wed Oct 12, 2011 11:10 am
by serengeor
YankzzDev wrote:hmmm, i have another question...


after i load the model, it's displayed on the screen, but i load another model, it's displayed 2 model with selected one and previous one...

how i can clear the previous one?
Read the F***** API and get some c++ skills :|
Not trying to be rude, but basically it seams that we're programming for you.

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Wed Oct 12, 2011 3:34 pm
by aanderse
YankzzDev wrote:hmmm, i have another question...


after i load the model, it's displayed on the screen, but i load another model, it's displayed 2 model with selected one and previous one...

how i can clear the previous one?
can you please post your code so i can understand what you mean?

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Thu Oct 13, 2011 3:27 am
by YankzzDev
serengeor wrote:
YankzzDev wrote:hmmm, i have another question...


after i load the model, it's displayed on the screen, but i load another model, it's displayed 2 model with selected one and previous one...

how i can clear the previous one?
Read the F***** API and get some c++ skills :|
Not trying to be rude, but basically it seams that we're programming for you.
the rude one is you... i not asking you to programming for me.....

Because i don't understand so i ask..

i am not expert like you(C++ Expert maybe than C++ god)..

i am newbie in c++ and irrlicht engine too...

my basic languange is vb.net..

if i don't understand, so i ask? it's fault?

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Thu Oct 13, 2011 3:30 am
by YankzzDev
aanderse wrote:
YankzzDev wrote:hmmm, i have another question...


after i load the model, it's displayed on the screen, but i load another model, it's displayed 2 model with selected one and previous one...

how i can clear the previous one?
can you please post your code so i can understand what you mean?
i am so bad luck.. my hard disk is damaged yesterday.. all my files are gone.. so i can't not upload my code to you now.. i will upload it after i fix my computer.. thank's for your help

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Thu Oct 20, 2011 3:55 am
by YankzzDev
here is my code...

http://www.2shared.com/file/U5jXL-fP/Vi ... nning.html

i wish to ask about collada files..

do you try to load a collada files?

i export a collada files using sketch up 8, and show in irrlicht engine.. but it's failed

and i try using sketch up 7, it's can load it, but not exactly what i expected..

do you have any solution?

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Thu Oct 20, 2011 6:02 am
by Virion
YankzzDev wrote:it's work on windows? i want integration to windows
yes it does. Qt is cross platform.

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Thu Oct 20, 2011 11:54 am
by hybrid
Due to element ordering changes in the last few versions of sketchup, the current Irrlicht loader cannot open those collada files properly. Next version wil have a fixed loader.

Re: Irrlicht / Qt4 integration + QtCreator

Posted: Fri Oct 21, 2011 3:00 am
by YankzzDev
hybrid wrote:Due to element ordering changes in the last few versions of sketchup, the current Irrlicht loader cannot open those collada files properly. Next version wil have a fixed loader.

tq admin