Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Where is code file

  1. #1
    Join Date
    May 2006
    Location
    Pune,India
    Posts
    63
    Thanks
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Where is code file

    I'm using Qt 4.1.2 free. with mingw onwindows.
    I have created a form, perform connections.
    I didn't find how create new slots, where to write code(form.ui.h ) and how to create main.cpp.
    I done programming in Qt 3.x on linux. I want to port my code on windows.

    It seems trolltech has changed whole IDE.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Where is code file


  3. #3
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Where is code file

    Quote Originally Posted by safknw
    I'm using Qt 4.1.2 free. with mingw onwindows.
    ...
    It seems trolltech has changed whole IDE.
    In QT 4.x QDesigner it's only an interface designer and not an IDE.
    See the QT web page to read why !
    A camel can go 14 days without drink,
    I can't!!!

  4. #4
    Join Date
    Jun 2006
    Posts
    8
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question Re: Where is code file

    Quote Originally Posted by mcosta
    In QT 4.x QDesigner it's only an interface designer and not an IDE.
    See the QT web page to read why !
    Lotsa questions. Downloading QT4 killed every thing QT-related. Nothing compiles.
    Q1: Which QT web page is being referred to above?
    Q2: What happened to Form1.h, .moc/xx, .obj/xx, .ui/xx etc?
    Q3: What is now responsible for creating these, if they are still needed?
    Q4: How do we get from .ui XML files to whatever is now used?
    Q5: Or is QT4 to be used in conjunction with KDevelop or something else? If so, how?
    Q6: Is there a simple step-by step example <!!!using the V4 GUI builder!!!>?
    The (old) examples I have found so far rely on construction of the application UI "manually" by code, rather than drag & drop designer construction. Drag & drop is the reason I wanted to use Qt. It is often the only way I can force the layout I want.
    Q7: When do we get a drag & droppable QCanvasView (or similar)? Is there any reason this cannot be done?

    Jim Adamthwaite.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Where is code file

    Quote Originally Posted by jimadamthwaite
    Lotsa questions. Downloading QT4 killed every thing QT-related. Nothing compiles.
    Maybe you uninstalled Qt3? Qt4 doesn't replace Qt3.

    Q1: Which QT web page is being referred to above?
    Qt reference about designer.

    Q2: What happened to Form1.h, .moc/xx, .obj/xx, .ui/xx etc?
    Nothing happened. What do you mean?

    Q3: What is now responsible for creating these, if they are still needed?
    The mechanism is still the same -- moc and uic create those.

    Q4: How do we get from .ui XML files to whatever is now used?
    UI files are still used. As I said before, the mechanism didn't change between Qt3 and Qt4.

    Q5: Or is QT4 to be used in conjunction with KDevelop or something else? If so, how?
    Yes, you have to use a 3rd party editors to write code.
    How? Well, it depends on the editor/IDE you use. For KDevelop it is enough to assure qmake from Qt4 is earlier in the path than qmake from Qt3 and use KDevelop like you would work with Qt3 projects. Most features will still work.

    Q6: Is there a simple step-by step example <!!!using the V4 GUI builder!!!>?
    See the link in the second post of this thread. I'm sure there is something there. Additionally there is a video tutorial available for download from Trolltech site.

    The (old) examples I have found so far rely on construction of the application UI "manually" by code, rather than drag & drop designer construction. Drag & drop is the reason I wanted to use Qt. It is often the only way I can force the layout I want.
    I don't quite understand what you mean, but good for you!

    Q7: When do we get a drag & droppable QCanvasView (or similar)?
    In Qt4.2. It'll be called QGraphicalView.
    Is there any reason this cannot be done?
    The class is not ready yet. It'll be released with Qt4.2. As for Qt3 there was little use of QCanvasView put directly on a form as for most uses it had to be subclassed. But if you insist on using QCanvasView from Designer in Qt3, you might find wwWidgets interesting.


    BTW. It's "Qt" and not QT.

  6. #6
    Join Date
    Jun 2006
    Posts
    8
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Where is code file

    I am running SuSE 10.0. I tried keeping Qt3 & downloading Qt4, nbg. Next I deleted all Qt stuff & installing Qt4 only, nbg. Next I reloaded Qt3 & 4 together. Having read more, I now understand that Qt4 will not do the .ui stuff I was used to in Qt3. I am still hoping that less is more. I have yet to work out the intricacies of uic & moc, I did not need to know this before. The tutorials do not say. Still reading.

    I spent a LOT of time hunting around Trolltech & qtcentre FAQ's looking for something helpful & found that several people were effectively balked by the same lack of explicit info on how to get a simple Qt4 GUI-built app up & running.

    None of the doc's I have read on Qt4 give the same kind of explicit blow-by-blow detail that is to be found in the Qt3 'Metric" conversion calculator. The "Getting started with Qt Designer" manual that comes with Qt4 contains no such info, for all the hard work which was obviously put into it.

    The absence of a few document lines like:

    Now create a project file named "mytutorial3.pro" and edit it to contain:
    ...........
    If you are using Windows XP it should look like:
    ...........
    Note that this only needs to be done once. Now enter the shell command line:
    qmake xxxx
    to create the files xxxx which....

    ...can cost days of frustration & probably cuts your Qt audience in half due to discouragement. This sort of thing can be a show-stopper. I know a few tech-people who will not change to Linux as a development environment because of "gappy" literature. Typically an expert (you) does not know just how much he/she knows, and therefore does not know what can be safely assumed or worked around.

    The tutorial must work, using only the info given on the tutorial page with minimal assumed knowledge or other resources. The Qt3 Color Tool tutorial relied on file "tabwidget.png" which was not in my Qt3 release, nor easily found on the web. Several people enquired about this on Trolltech's forum, without answer.

    The tutorials must clearly state which Version of Qt should be used. You might have a tutorials page with categories like:
    Tutorials for Qt3.x
    Tutorials for Qt4.x
    Tutorials for Qt2...Qt4

    I offer myself as an untrained monkey to review tutorials & take notes on the areas of difficulty. I can submit the notes and suggest additions which might clarify. This can only work for a while as I would soon start to become a trained monkey. The baton must then be passed on to other newcomers.

    I imagine that tutorial lengths will only be increased by 5 to 10 per cent, but your queries should reduce by a greater amount. Notice how many queries are just re-wordings of the same problems. This is a sure-fire indicator.

    I can be contacted at "secad AT netspace dot net dot au". I can start straight away on an informal (irregular after hours) basis. I am determined to see Planet Qt spin. I presume that revisions to Qt docs are legally permissable and that you have a way of updating the online versions and the time to do so.

    Thanx for your time,
    Jim Adamthwaite

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Where is code file

    Quote Originally Posted by jimadamthwaite
    I am running SuSE 10.0. I tried keeping Qt3 & downloading Qt4, nbg. Next I deleted all Qt stuff & installing Qt4 only, nbg. Next I reloaded Qt3 & 4 together.
    In PLD Linux (Th) all Qt4 modules are available as packages and they can coexist with Qt3 without any problems. Also I have never experienced any problems with compiling Qt4 from sources --- all you have to do is to follow instructions in the INSTALL file.

    Quote Originally Posted by jimadamthwaite
    Having read more, I now understand that Qt4 will not do the .ui stuff I was used to in Qt3.
    Could you explain that? Qt4 can do everything Qt3 could do and even more.

    Quote Originally Posted by jimadamthwaite
    I have yet to work out the intricacies of uic & moc, I did not need to know this before.
    Actually you had to know something about them to use Qt3. qmake will handle moc and uic for you, just as in Qt3.

    Quote Originally Posted by jimadamthwaite
    Several people enquired about this on Trolltech's forum, without answer.
    What "Trolltech's forum"? AFAIK Trolltech runs only mailing lists.

    Quote Originally Posted by jimadamthwaite
    The tutorials must clearly state which Version of Qt should be used.
    Qt4 docs contain only Qt4 tutorials.

    Quote Originally Posted by jimadamthwaite
    I presume that revisions to Qt docs are legally permissable and that you have a way of updating the online versions and the time to do so.
    This site is run by the community, if you want to make changes in the official Qt documentation, you will have to contact Trolltech.

    If you want, you could contact Johan Thelin (the author of The Independent Qt Tutorial) --- I'm sure he will be interested in your feedback.
    Last edited by jacek; 14th June 2006 at 14:25.

  8. #8
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Where is code file

    I believe Jim has some good points. Being as I have started out, and only been working with the Win XP version so far, I see lots of places where the documentation tries to explain multiple platforms at once.

    For instance, the documentation has many references to using qmake or QT += sql or QT += opengl. If you're using Win XP, you don't ever need to touch the qmake tool or edit the .pro file. To even talk about it can be misleading to the Windows programmer; he may try to edit the .pro file, not knowing that the VS integration mostly handles all that stuff already.

    It would be nice to know about the gotchas and pitfalls of using the VS integration though - while it has been very easy to use, the documentation for it has been fairly scant, so you have to rely on a lot of programmer's intuition.

    It would be nice to have specific sections for platform-specific details of Qt. Or maybe I just haven't found those sections yet.
    Software Engineer



  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Where is code file

    Quote Originally Posted by gfunk
    If you're using Win XP, you don't ever need to touch the qmake tool or edit the .pro file.
    Only if you use VS integration. It won't help you much if your program must work on more than one platform.

    Quote Originally Posted by gfunk
    It would be nice to have specific sections for platform-specific details of Qt. Or maybe I just haven't found those sections yet.
    Look for "Window System Specific Notes" in Qt Assistant.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Where is code file

    Quote Originally Posted by gfunk
    For instance, the documentation has many references to using qmake or QT += sql or QT += opengl. If you're using Win XP, you don't ever need to touch the qmake tool or edit the .pro file. To even talk about it can be misleading to the Windows programmer; he may try to edit the .pro file, not knowing that the VS integration mostly handles all that stuff already.
    Please remember that VS integration is only available for commercial users. It would be unwise to forget about the rest of them.
    Last edited by wysota; 14th June 2006 at 23:03.

  11. #11
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Where is code file

    I'm not saying to forget the users, I'm saying to actually address *all* of them, specifically and separately. As cross-platform as Qt may be, there are still certain quirks from platform to platform, and it is not easy to categorically search for and identify what these differences are, unless you happen across it by chance somewhere in the documentation.
    I believe http://doc.trolltech.com/4.1/winsystem.html is a good start, but it just scratches the surface.
    Software Engineer



  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Where is code file

    There is a person in Trolltech who is directly responsible for maintaining the docs. I can't tell you the exact address, but you can report your doubts about the manual to qtbugs (I think the address is qtbugs<at>trolltech.com but you can use the tasktracker too).

  13. #13
    Join Date
    Jun 2006
    Posts
    8
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Where is code file

    --- all you have to do is to follow instructions in the INSTALL file.
    I installed an RPM via SUSE's yast2, making it hard to know where things should end up. One page explicitly showing the preferred dir structure and environment variables for EACH OS variant you support would be really helpful. I imagine for example, that SUSE & Trolltech consult on such matters.

    Qt4 docs contain only Qt4 tutorials.
    I was referring to the need for tutorials USING the drag & drop designer rather than constructed in code. (As in http://doc.trolltech.com/4.1/tutorial-t1.html).

    These tutes, while interesting, lets things fall where they may on the window depending on one's level of understanding of non-obvious "nudging" control features, and do not translate easily to a real-world app which WILL be done using the designer.

    Fer instance, after successfully doing the cannon tute series (in Qt3), I still can't work out how to make an application of my own to get a canvasview item to appear on THE form as designed within the GUI designer. It appears in its own separate window #2, with the rest of the GUI widgets appearing in window #1. The cure is probably embarrassingly simple, if I could find it. This has cost days. Rabid application development indeed.

    What "Trolltech's forum"?
    http://lists.trolltech.com/qt-interest/
    A rose by any other name... and the user queries regarding "tabwidget.png" were still unanswered last time I looked.

    Could you explain that? Qt4 can do everything Qt3 could do and even more.
    An example for a recommended modifcation to "The Independent Qt Tutorial - Qt 4 Edition", the files where copied & pasted from the tute page:

    2.3. The Class Implementation

    In the last section we skipped over the implementation of the number holder class. As the class is trivial, the main part of the implementation is not that very interesting.

    This should read:

    2.3. The Class Implementation

    We now present the implementation of the number holder class. It is to be placed in a file called "numberholder.cpp". The contents are as follows:

    // Constructor
    NumberHolder::....... etc.

    The justification for such a pedantic approach is that the people doing these exercises are most likely beginners at C++, are also beginners at Qt, probably a Linux newbie, and have a new & possibly incorrect Qt installation or configuration. The tutorial must remove as much uncertainty as possible to allow debugging.

    In my case, when making the numberholder tutorial, the following occurs:
    bash: qmake -project
    OK so far.
    bash: qmake
    Still OK.
    bash: make
    We get:
    g++ -c -pipe -fno-strict-aliasing -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/default -I. -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include -I. -I. -I. -o main.o main.cpp
    numberholder.h:3: error: expected class-name before ‘{’ token
    numberholder.h:4: error: ‘Q_OBJECT’ does not name a type
    numberholder.h:15: error: expected `:' before ‘slots’
    ...20 more error lines...
    main.cpp:14: error: within this context
    make: *** [main.o] Error 1

    The error line:
    numberholder.h:3: error: expected class-name before ‘{’ token

    ...implies that QObject is not recognised, and the rest follows logically from whatever caused that. I may have an installation error - possibly a missing library, PATH or other environment problem. Since I added Qt4 that is. Still looking at that.

    This site is run by the community, if you want to make changes in the official Qt documentation, you will have to contact Trolltech.
    If you get one query, answer it as you deem appropriate. A second similar query identifies a doc gap. Soon you will get the third query.

    If you want, you could contact Johan Thelin (the author of The Independent Qt Tutorial) --- I'm sure he will be interested in your feedback.
    Roger willco, and thank you for your time & patience.

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Where is code file

    Quote Originally Posted by jimadamthwaite
    I installed an RPM via SUSE's yast2, making it hard to know where things should end up. One page explicitly showing the preferred dir structure and environment variables for EACH OS variant you support would be really helpful. I imagine for example, that SUSE & Trolltech consult on such matters.
    Unfortunately it's not that easy --- each Linux distribution has its own rules. Especially when it comes to directory structure (hopefully FHS and LSB will become popular over time). It's impossible for a software developer to make the software work on every Linux distribution --- people that make those distributions are responsible for that. Software developers can only make their software work in a few chosen environments.

    Quote Originally Posted by jimadamthwaite
    I was referring to the need for tutorials USING the drag & drop designer rather than constructed in code. (As in http://doc.trolltech.com/4.1/tutorial-t1.html).
    What about Qt Designer manual? If you want to learn Qt you must understand how it works and you won't learn it by using only Qt Designer. If you are a programmer most of the time you will be writing code --- not dragging & dropping.

    Quote Originally Posted by jimadamthwaite
    These tutes, while interesting, [...] do not translate easily to a real-world app which WILL be done using the designer.
    What about Using a Component in Your Application and Subclassing and Dynamic Dialogs? Actually Qt Designer is only a layout editor --- together with uic it can generate some code for you, that you would have to write yourself otherwise. You can treat it as a form of code generator. There's an excellent book on programming titled "The Pragmatic Programmer". Authors advise not to use any wizards for generating code, if you don't understand that generated code.

    You must understand the basic mechanisms that make Qt work. Qt is not only a Qt Designer --- it's a framework, this means that it will affect all of your code. Qt Designer only handles the creation and positioning of widgets (the most tedious and time consuming part of GUI programming). The rest you must write yourself.

    Quote Originally Posted by jimadamthwaite
    Fer instance, after successfully doing the cannon tute series (in Qt3), I still can't work out how to make an application of my own to get a canvasview item to appear on THE form as designed within the GUI designer.
    That's because it can't be done in Qt Designer. You must write few lines of code that will add an item to the canvas. If you have any specific questions in this matter feel free to ask them in a new thread.

    To be honest, two years ago I knew nothing about Qt. All I had was Qt docs and The Independent Qt Tutorial. Yet I was able to port my application from wxWidgets to Qt in two weeks (it was a simple optical simulator with QCanvasView as the main GUI component).

    If you get one query, answer it as you deem appropriate. A second similar query identifies a doc gap. Soon you will get the third query.
    Yes, but you must understand that we are not Trolltech and we are not responsible for Qt documentation. We just offer free help, because we like Qt and we like to help others.

  15. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Where is code file

    Quote Originally Posted by jimadamthwaite
    The justification for such a pedantic approach is that the people doing these exercises are most likely beginners at C++, are also beginners at Qt, probably a Linux newbie
    IMO one should learn one thing at a time. You are right that tutorial authors shouldn't overestimate the readers' knowledge, but you just can't learn 3 different things at the same time (and if you try to do that, you can't blame the author).

    Quote Originally Posted by jimadamthwaite
    The error line [...] implies that QObject is not recognised, and the rest follows logically from whatever caused that.[...] Still looking at that.
    Do you have #include <QObject> at the beginning of numberholder.h?

  16. #16
    Join Date
    Jun 2006
    Posts
    8
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Where is code file

    Quote Originally Posted by jacek
    IMO one should learn one thing at a time. You are right that tutorial authors shouldn't overestimate the readers' knowledge, but you just can't learn 3 different things at the same time (and if you try to do that, you can't blame the author).
    I think you are right there. I am trying to read stuff from all over the place, it could hardly be called systematic. My apologies for "firmness of voice".

    Do you have #include <QObject> at the beginning of numberholder.h?
    No, I did not spot that one. Where was it? Dang sure fixed it real purdy good-like. I wonder whether this tute was so simple that noone ever tried to do it. I would have read it, nodded my head and moved on, it was desperation that drove me to start at the bottom (C++ tute) and do every little step.

    Thank you again. The journey continues...

  17. #17
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Where is code file

    Sorry to cut into the discussion

    If you take a closer look at resources related to Qt (like Qt manual, this forum and probably others too), you'll notice that everywhere they advise you to learn C++ before starting with Qt. The reason is very simple -- Qt is not some "magic box" where you put a few building blocks and you have a ready-to-sell application. Of course for some simple apps this is true, but not for ones which actually do anything. It is also true that you can get away without knowing C++ and still be able to develop applications with Qt just by asking questions on forums like this one, but you won't be able to understand the code and know what it is really doing. It's like putting a monkey in front of a TV -- it'll start to mimic things it sees in the tv, but won't be able to go beyond that. C++ techniques (very often quite advanced ones) are used extensively throughout Qt-enabled programming and I fully understand Johan who doesn't write bodies of most simple classes. There are many tutorials and books on C++, you don't have to learn it by reading a Qt tutorial -- if you really need help with implementing classes, OOP tutorials are there to help you.

    To be honest I hate tutorials "we now press the second button from the left in the sixth row from the bar of icons and choose a file called something.cpp". If someone can't comprehend a "please open the file you previously saved" instruction, I doubt he/she will be able to do anything serious with Qt or any other technical device without "reaching the next level of consciousness".

  18. #18
    Join Date
    Jun 2006
    Posts
    8
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Where is code file

    Well said. But we have to start the adventure of learning somewhere.

    There is a zen saying (paraphrased) about the stages of learning.
    1. Those who do not know that they do not know.
    2. Those who do know that they do not know.
    3. Those who do know that they do know.
    4. Those who do not know that they do know.

    Level 1 people are unaware of the existance, importance or size of a field.
    Level 2 people are aware of the field but do not have standalone competence.
    Level 3 people have reached good proficiency and are suited to teaching 1's & 2's.
    Level 4 people have reached the highest guru levels and can only teach 3's. They automatically correctly perform level 2 stuff at an intuitive level and have forgotten what it was like.

    I am at approx. Level 2.4 on Qt/C++/Linux and trying to raise that to Level 3. I think should be attainable if I spend a year of evenings at it reading everything I can get my lunch-hooks on and trying to think in C++. So where better to start than The Correct C++ Tutorial for Qt4?

    I understand the difficulty of writing doc's. I've done a few. After completing a complex project one stumbles gasping across the line while offering the project disk with quivering outstretched hand, to be asked "OK, now what about the user manual?". It's not easy to summon the same level of energy for it. Unpaid, even a saint finds it taxing.

    As to the level of audience to pitch a tutorial lesson series at, I imagine that only the first lesson would need to cover low level stuff like "click the third button" along with an explanatory paragraph. Once the user has identified the button and understands why it was to be clicked, subsequent lessons can pass lightly over this detail. The art is to make each step of the staircase of a climbable size, with no omitted or cracked treads.

    I guess traditional lecturer/student arrangements have the advantage that the student can ask for clarification as needed. Uncertainty need gnaw for only seconds rather than days and the lecturer can revise the lesson for next term's students. This arrangement is expensive of course. Books and web resources are cheaper but require more dedication from the student.

    A typical scenario:
    - User decides "I need to display a string on the screen".
    The book then sez:
    - For simple strings which do not change much in length, use a Label. To read, write or reposition the label the useful setters and getters are... . For more elaborate features like font changes or controlling visibility refer to QLabel in...
    - For strings which may change significantly in length or require direct user input use a QEditLine. An example may be found at... The string is stored internally as.. and may be manipulated with the normal functions for that class such as... .
    - For multi-line text use a .... Examples can be found at... and so on.

    Much of this info is in the class description notes, but one needs to somehow know which class is likely to be the goldmine. This is not as easy as it might sound. A list of hundreds of classes, many of which can require over an hour of reading, presents a formidable task if you are not familiar with them. A single paragraph could over come this. Quite often only a combination of classes is meaningful, such as a canvas and canvas view or a pixmap and painter. A means of mapping typical tasks to likely candidate classes would be really really good. Really. Good.

    Anyway, it is time for me to get on with the tutorial. I still think it's aimed about right, it explained a few points which had nagged me for weeks. They were points to which I could find no reference to in the large amount of Qt docs I have hunted through. With the work already done by Johan Thelin and suggestions from any/all of us, it could become a significant Qt guide. It is needed for those who follow.

    Thank you all for your contributions. It's still fun.

  19. #19
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Where is code file

    To be honest the best way to learn Qt is to sit down and do something simple with it ("Hello world" is a good thing to start with). Then add something more complex, etc. No tutorials needed. Of course all this applies if one already knows C++.

  20. #20
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Where is code file

    Quote Originally Posted by jimadamthwaite
    I think should be attainable if I spend a year of evenings at it reading everything I can get my lunch-hooks on and trying to think in C++. So where better to start than The Correct C++ Tutorial for Qt4?
    The whole year is far too much, you don't have to be a C++ guru, but you must understand how C++ works. Qt is built on top of C++ and there is no way you can grok it without knowing C++. I don't think that there's any on-line tutorial as good as books on C++. My personal favorite is "C++ Primer" by Lippman and Lajoie, but there are other books too.

    Quote Originally Posted by jimadamthwaite
    A list of hundreds of classes, many of which can require over an hour of reading, presents a formidable task if you are not familiar with them.
    Yes, but you can search the docs quite easily with Qt Assistant and there is a number of articles that describe Qt's internals and how its classes interact with each other. You can find the whole list here.

Similar Threads

  1. QtHelp Module - registering compressed help file gives error
    By Ankitha Varsha in forum Qt Programming
    Replies: 1
    Last Post: 16th May 2008, 14:14
  2. QHttp::post() - cannot upload file
    By arunredi in forum Qt Programming
    Replies: 5
    Last Post: 16th May 2008, 12:13
  3. source code from Qt4 designer
    By freelancer.kiran in forum Qt Tools
    Replies: 2
    Last Post: 12th May 2008, 07:40
  4. Re: Opening Project file Issue in Edyuk
    By philwinder in forum Qt-based Software
    Replies: 6
    Last Post: 5th May 2008, 20:49
  5. How To Extract A File
    By deekayt in forum General Programming
    Replies: 7
    Last Post: 5th December 2006, 18:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.