Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Mysota, you make a good point, but in my case I am in a learning process and re-writing designer code is a great learning tool. I also have problems with "ddd" and "gdb" (listing string variables ) so I import my code into KDevelop which has excellent debugging features. Can I import designer code into KDevelop.
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by impeteperry
Can I import designer code into KDevelop.
What do you want to debug in UI files? uic generates normal C++ classes out of ui definitions, so I don't see a reason not to be able to open them from within KDevelop.
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by wysota
What do you want to debug in UI files? uic generates normal C++ classes out of ui definitions, so I don't see a reason not to be able to open them from within KDevelop.
I'm sorry, I guess i didn't make myself clear. I want to work in an enviroment where I can look at "string " variables. I started programming using KDevelop 2.1 where I had the designer and good debugging facility.. I had trouble understandiny all the options offered in KDevelope 3.1 so I went to Qt designer (trully a great),
Whether it is O'Reilly's Programming with Qt or C++ Programming With Qt3, my two bibles, I have to actually keyin the examples for the stuff to sink in my thick head and so as I used designer, I tried to duplicate the designer layout with writing the Qt code. This works for my program as I have pretty much a fixed layout. ( the original was a DOS command line engineering graphics program )
I never could find a way with gdb or ddd to look at string variables!
I found I could import my hand-coded program into KDevelop3 and see these damm string variables, not on the layout stuff, which is static, but on operational functions. My program is heavy with string variables and stringlists.
My question was "could a program whose layout was developed in designer, be imported into KDdevelop?
I see that KDevelop has a designer option, but I have not been able to get it to load.
If I could get ddd to display string variables and get kwrite to be the default editor I would be happy.
Sorry to be so long winded,
pete
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
If you open up QMake tab of your project in KDevelop, you 'll see that there is a FORMS entry. This is where you should put your .ui files (right click, add files) and KDevelop will take care of the rest ;)
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by yop
If you open up QMake tab of your project in KDevelop, you 'll see that there is a FORMS entry. This is where you should put your .ui files (right click, add files) and KDevelop will take care of the rest ;)
Thank you very much I shall try that.
Any help on "ddd" and string variable?
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by impeteperry
Thank you very much I shall try that.
Any help on "ddd" and string variable?
Could you elaborate on the problem a little more? What kind of "string variables" are we exactly talking about? All string variables in a UI definition are visible in the form or in object properties. And after uic does its job, they get wrapped into the C++ class which gets generated, so you can access it like any other class.
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
I believe he wants to know how to display a QString variable in ddd in readable form:
Break where your QString is defined as usual. Now type in the command window:
Code:
print variableNameOfYourQString.toStdString()
Not perfect, but it works ;)
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by Codepoet
I believe he wants to know how to display a QString variable in ddd in readable form
Yeap that's it, we had a similar conversation in http://www.qtcentre.org/forum/showth...=1628#post1628
Codepoet I love your workaround, I never thought of that, thanks :)
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
But what has designer generated code to do with it?
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by wysota
But what has designer generated code to do with it?
Nothing, it's just that impeteperry remembered us having this conversation and he asked :)
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by wysota
additionaly you get ui/logic separation.
Seperating ui and logic as a great, great thing...
Thats why I write my ui and logic into different classes when hard coding :-)
LOL
Katrina
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Hi Codepoet (what a great name for a programmer )
Now I have to go back and learn ddd all over again.
Thanks a lot.
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by impeteperry
Hi Codepoet (what a great name for a programmer )
:D
DDD is a wonderful tool - have you ever tried using it together with gnuplot? It can plot the contents of your datastructures ;)
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Thanks Codepoet, but right now I have a "senior moment". I can't seem to get started with ddd. I load my program (pm) from a thrminal with "ddd pm".
ddd comes up withh my "main.cpp" showing ok, but how in the h... do i get "dlgmain.cpp" to show?
Even tho I used ddd quite a bit a yeari or so ago, I never quite usderstood the help aids and what I don't use I forget .
Since you are so high on ddd and there is a clue on displaying string variables I would like to try it a again
pete
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by impeteperry
but how in the h... do i get "dlgmain.cpp" to show?
Even tho I used ddd quite a bit a yeari or so ago, I never quite usderstood the help aids and what I don't use I forget .
File->Open Source... (with your programm loaded). You ll see all the sourcefiles of your app listed.
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
yop is right. You only have to take care when you work with plugins - those are not loaded until your program runs / you load them in your code. Just "run" the program untill they are loaded, interrupt and then use File->Open Source.
I often have a little problem with that dialog: If I want to enter a fliter string for the filenames I have to first click into it (normal so far) but the mouse cursor must stay in the field - otherwise ddd does not accept input... Maybe only my machine here...
I have a link to a ddd tutorial that I've read a long time ago: http://www.linuxgazette.com/issue73/mauerer.html
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by yop
File->Open Source... (with your programm loaded). You ll see all the sourcefiles of your app listed.
I must be very stupid but all I get when I try File->Open dlgMain.cpp is " try help".
( I get the same responce with any variation of the file, File Files, files with -> or without )
I start with "ddd pm".
ddd loads with "main.cpp" showing.
Program runs
I can step thru "main.cpp" (which I don't ned to do.)
What do I enter on the command line to replace "main.cpp" with "dlgmain.cpp"?
I go thru the tutorials and the manual and all I find are examples working on "main.cpp"
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
I meant the menu item File :) not write file on the command line
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Quote:
Originally Posted by yop
I meant the menu item File :) not write file on the command line
Now I really am confuned.!
What do I key in at the botton of the screeen.
(gdb) ????
to get my "dlgmain.cpp" to replace the "main.cpp"
1 Attachment(s)
Re: Intro - Warning: BBBOORRRIINNGGG!!!!!
Just see the attached image. This will give you a listing of all of your source files and you can select which one you want to open from there.