Irrlicht / Qt4 integration + QtCreator

A forum to store posts deemed exceptionally wise and useful
YankzzDev
Posts: 23
Joined: Wed Oct 05, 2011 4:37 am
Location: Indonesia

Re: Irrlicht / Qt4 integration + QtCreator

Post by YankzzDev »

i am using visual studio 2008 to do it, not code block.. can you help me? i really need it..
Nobody is Perfect!!
aanderse
Posts: 155
Joined: Sun Aug 10, 2008 2:02 pm
Location: Canada

Re: Irrlicht / Qt4 integration + QtCreator

Post by aanderse »

you'd need to state the problems you are having before anyone can help you
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: Irrlicht / Qt4 integration + QtCreator

Post by Virion »

YankzzDev wrote:it's work on windows? i want integration to windows
yes it works on windows
YankzzDev
Posts: 23
Joined: Wed Oct 05, 2011 4:37 am
Location: Indonesia

Re: Irrlicht / Qt4 integration + QtCreator

Post 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?
Nobody is Perfect!!
aanderse
Posts: 155
Joined: Sun Aug 10, 2008 2:02 pm
Location: Canada

Re: Irrlicht / Qt4 integration + QtCreator

Post 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));
YankzzDev
Posts: 23
Joined: Wed Oct 05, 2011 4:37 am
Location: Indonesia

Re: Irrlicht / Qt4 integration + QtCreator

Post 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!!
Nobody is Perfect!!
YankzzDev
Posts: 23
Joined: Wed Oct 05, 2011 4:37 am
Location: Indonesia

Re: Irrlicht / Qt4 integration + QtCreator

Post 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?
Nobody is Perfect!!
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Irrlicht / Qt4 integration + QtCreator

Post 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.
Working on game: Marrbles (Currently stopped).
aanderse
Posts: 155
Joined: Sun Aug 10, 2008 2:02 pm
Location: Canada

Re: Irrlicht / Qt4 integration + QtCreator

Post 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?
YankzzDev
Posts: 23
Joined: Wed Oct 05, 2011 4:37 am
Location: Indonesia

Re: Irrlicht / Qt4 integration + QtCreator

Post 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?
Nobody is Perfect!!
YankzzDev
Posts: 23
Joined: Wed Oct 05, 2011 4:37 am
Location: Indonesia

Re: Irrlicht / Qt4 integration + QtCreator

Post 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
Nobody is Perfect!!
YankzzDev
Posts: 23
Joined: Wed Oct 05, 2011 4:37 am
Location: Indonesia

Re: Irrlicht / Qt4 integration + QtCreator

Post 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?
Nobody is Perfect!!
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: Irrlicht / Qt4 integration + QtCreator

Post by Virion »

YankzzDev wrote:it's work on windows? i want integration to windows
yes it does. Qt is cross platform.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Irrlicht / Qt4 integration + QtCreator

Post 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.
YankzzDev
Posts: 23
Joined: Wed Oct 05, 2011 4:37 am
Location: Indonesia

Re: Irrlicht / Qt4 integration + QtCreator

Post 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
Nobody is Perfect!!
Post Reply