Make coding easier for a learner of Qt



  • Hi,

    I'm at the first stages of Qt and begin writing a simple Qt program this way:
    1- I create a C++ header file for declarations
    2- then a C++ source file for implementations.
    3- then a main.cpp file.
    After these using the qmake command on a cmd create the .pro file and some modifications and at the end running the program.

    But the issue. At the stages 1 and 2 that takes much of the time, known names like class, functions, types and etc are not auto-completed when I start typing them but at the end (after running) and modification will be easy and take less time.
    My question is, is it possible to make that feature available at the beginning too? At least for built-in types.


  • Lifetime Qt Champion

    Hi,

    From what you wrote it seems you are doing everything from the command line. So what auto completion are you talking about ?

    Note that if you are using Qt Creator, it already provides lots of projects template to start from so you can already benefit from code completion etc.



  • @SGaist

    From what you wrote it seems you are doing everything from the command line. So what auto completion are you talking about ?

    No. I meat in the Edit view of the Qt Creator IDE used for coding.

    Note that if you are using Qt Creator, it already provides lots of projects template to start from so you can already benefit from code completion etc.

    Yes, I'm waiting for the place where the book tells me to use them and also directs me.


  • Qt Champions 2017

    hi
    Its very unclear what you are asking. I read it as
    "how can i create a project faster than by hand editing"

    To create a new gui project, one simple choose
    File -> New Project or file
    then Application as type and GUI application in the right side
    alt text

    You get the main.cpp and a mainwindow. ready to run.


  • Lifetime Qt Champion

    The feature is already there from the start, just use the tools you have at your disposal without waiting for the book to tell you to do it.

    Do you realise you are basically complaining about an "old" book teaching you how to use Qt from scratch while nobody forbids you to directly use Qt Creator with all its features to code ?



  • @mrjj

    alt text

    Your Qt Creator is really fascinating! May I ask what version you use or what OS you're using?



  • @SGaist

    The feature is already there from the start, just use the tools you have at your disposal without waiting for the book to tell you to do it.

    Yes, but there are two options that I should cull one!
    The first is using the new method and that way I can't rely on the book at this point and will be bending to Docs.

    The other option is using the old method but having the book as my supporter! I cull this.

    Do you realise you are basically complaining about an "old" book teaching you how to use Qt from scratch while nobody forbids you to directly use Qt Creator with all its features to code ?

    Yeah, I know. I wish there were a new edition of that book. ;)


  • Qt Champions 2017

    @tomy
    Hi
    That is just the newest Creator. 4.41

    If you can run the
    c:\MaintenanceTool.exe and select "Update components "
    Should give the newest version.

    //your code here

    As far as i recall the book does not really explain much about Creator.
    You can get an overview from here
    https://doc.qt.io/qtcreator/index.html
    Most of it is also beginner friendly and explains well
    https://doc.qt.io/qtcreator/creator-coding-navigating.html



  • @mrjj
    Hi,

    If you can run the
    c:\MaintenanceTool.exe and select "Update components "
    Should give the newest version.

    It failed! :(
    0_1507451989520_Capture.PNG

    As far as i recall the book does not really explain much about Creator.
    You can get an overview from here
    https://doc.qt.io/qtcreator/index.html
    Most of it is also beginner friendly and explains well
    https://doc.qt.io/qtcreator/creator-coding-navigating.html

    Thank you.


  • Qt Champions 2017

    Hmm are you using Qt5.5 ?
    Only saw that error there.



  • @mrjj
    It's 5.9 apparently.
    0_1507458454476_Capture.PNG


  • Qt Champions 2017



  • @mrjj
    I entered my account info and tested it again then it worked and it's now updated.
    Thanks.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.