Results 1 to 10 of 10

Thread: Newbie Questions

  1. #1

    Default Newbie Questions

    Hello

    I downloaded Qt a few days ago thinking that i'd make a GUI for my program that i wrote in C++, and i was told Qt would be the program to use.

    I have been doing C++ for about a weekend. I have created a small tool that will ask the user a series of queries, and then print everything to a text file in a specific format. Pretty easy, but later versions will load about 20 textfiles and let the user add, edit and remove entries, all which are crossreferenced all over the place.


    Anyway, but since i am a newbie, i am just completely unaware how to connect the gui to my program.
    How do i link this QLineEdit to the array i have created?
    How do i use this button to write everything to the file?

    I'd hope for a good tutorial as well.
    The ones i have tried are just too weak.

  2. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Newbie Questions

    I start with QT less than a year ago and I used the book "C++ GUI Programming with Qt 4". I think you will find some good examples there. Also you can use the QT Assistant. For specific QLineEdit check this link.

    http://doc.trolltech.com/3.3/qlineedit.html

    The more you read more pratice you will achieve with QT

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Newbie Questions

    The best tutorials are the Qt Assistant and Qt Demos. A beginner might not need to look beyond that.
    Just start with the Qt Assistant home page and learn about different sections. Then read what interests you, find a relevant example in Qt Demo.. and try to mess a little.. thats how u learn

  4. #4

    Default Re: Newbie Questions

    I couldnt find anything usefull there.

    Seems like Qt isnt very newbiefriendly.

    All i want is to print whatever is in this form to a textfile.
    Isnt that hard. And seeing that i already have it working in a console, all i need is to connect it to a gui.

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

    Default Re: Newbie Questions

    Quote Originally Posted by Pether View Post
    Seems like Qt isnt very newbiefriendly.
    Especially if you started learning C++ two days ago.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6

    Default Re: Newbie Questions

    I started writing the first part of the 2 months ago and was no problem with that.
    Started with the gui with qt just a few days ago, but as always with programming i have learnt, is that they all lack proper tutorials.

    '-Woo! You now know how to type Hello, world in 500 different ways, you can now take a job as a professional programmer, yay you!'

    And seeing that qt has rewritted everything from c++ to its own language it is just harder.

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

    Default Re: Newbie Questions

    Ok, because of being annoyed with a useless title of this thread I'm now going to inflict massive agressiveness on words you have written

    Quote Originally Posted by Pether View Post
    Started with the gui with qt just a few days ago, but as always with programming i have learnt, is that they all lack proper tutorials.
    Probably because of lack of will of opening the documentation. Or maybe you just missed the "Tutorials, Examples and Demonstrations" entry at the very beginning of the reference that points you to more or less than 100 tutorials and examples explained in detail. There is also the "All Overviews and HOWTOs" page listing the next hundred or so descriptions on how to do things. I assume you have read them before becoming convinced none of them is "proper".

    And seeing that qt has rewritted everything from c++ to its own language it is just harder.
    Qt doesn't provide a "language", it's plain old C++. If you have spent more than the weekend studying the language (C++, not Qt, the latter is not a language) or maybe read any of the "improper" tutorials you might have known that yourself. Qt doesn't prevent you from using anything from C++.

    But on the other hand if you have been programming in a similar manner as you are asking questions (being rude and completely uninformative) then I understand why you got stuck.

    How do you expect us to help you if you say nothing about your program apart from acknowledging that you didn't undestand basics of Qt (nor C++, I presume) before gettings your hands wet?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8

    Default Re: Newbie Questions

    Seems like Qt got a retarded Community as well.


    I said what my program was, and what i needed from Qt.
    It was extremely simple. And then i said that it wasnt possible to find tutorials about that, since they are about totaly different things.

    Bye bye

  9. #9
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Newbie Questions

    Quote Originally Posted by Pether View Post
    Seems like Qt got a retarded Community as well.
    whats the make of your phone?
    Nokia? -> they are so retarded that they bought Qt.
    Motorola? -> they are so retarded that they are using Qtopia in their phones from ages.
    Sony Ericsson? -> retarded Qt already ported to S60 on Nokia... soon u will see on other symbian platform
    HTC,ASUS etc (Windows Mobile)? -> unfortunately they got Qt there also..

    Whats your OS?
    i dont need to answer that.. RTFM.

    Looks like you live in a world full of retarded ppl all around you, and only u seem to be normal human

    Quote Originally Posted by Pether View Post
    I said what my program was, and what i needed from Qt.
    It was extremely simple. And then i said that it wasnt possible to find tutorials about that, since they are about totaly different things.
    so that means the tutorial says how to write "Hello World" program..
    and your need is to to write "Hi Mom!! see i am programming!!"
    ofcourse... tutorial doesnt have that..

    i think before learning C++ or Qt,, you first need to understand what a programmer is.
    A programmer is someone who 80% of time do innovation, and rest 20% time invents.
    If every requirment of yours is supposed to be in a tutorial then there is no need of a programmer.

    furthermore, if you spent just 2 days on Qt Assistant, then your current problem is a matter of how
    fast you type on keyboard.


    Quote Originally Posted by Pether View Post
    Bye bye
    Its good you dont want to join the retarded community. Thx a lot.
    Last edited by nish; 15th July 2009 at 02:42.

  10. #10
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: Newbie Questions

    Well, just to add some info:

    How do i link this QLineEdit to the array i have created?
    Just type "QlineEdit" in the QT Assistant index and you will find all the info you could need. Take a look to "text()" and "insert ( const QString & newText )"


    How do i use this button to write everything to the file?
    You could use QFile to manage your files and (from Qt Assistant) "Data is usually read and written using QDataStream or QTextStream, but you can also call the QIODevice-inherited functions read(), readLine(), readAll(), write()."


    But, of course, the most important is to read, read and read (and learn, learn and learn... and, in my case, ask in the forum, ask in the forum and ask in the forum :P)

Similar Threads

  1. Replies: 11
    Last Post: 13th July 2009, 16:05
  2. (probably newbie) Windows Mobile 5 questions
    By zeldaknight in forum Newbie
    Replies: 8
    Last Post: 6th May 2009, 05:12
  3. Memory management questions (im new to Qt)
    By scarvenger in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2007, 07:41
  4. Few newbie questions
    By Salazaar in forum Qt Tools
    Replies: 9
    Last Post: 3rd May 2007, 19:13

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.