Results 1 to 2 of 2

Thread: Cin and QT: Doesn't accept input from the user via the output screen

  1. #1
    Join Date
    Jul 2018
    Posts
    1
    Qt products
    Qt5

    Default Cin and QT: Doesn't accept input from the user via the output screen

    Hi there,

    I am very new at QT and have some knowledge on C++. My university has given us a textbook which explains very little about how or where to enter the code or what to choose when inputting the examples. If I type the Code in normal c++ it works. When I type it in a QT Application project file, the CIN statement doesn't allow one to input anything and I have to manually crash the program. Please can someone explain what I am doing wrong.

    I'd really appreciate it.

    Kind regards

    Sam

  2. #2
    Join Date
    Jun 2018
    Location
    Bangalore, India
    Posts
    6
    Thanks
    3
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Smile Re: Cin and QT: Doesn't accept input from the user via the output screen

    Hey there.
    You can use cin and cout in the main ie. the driver. Main.cpp.
    Since, you are a beginner you probably treat Qt as a language.
    Its not. Its just a framwork for GUI development. Basically, most of your input would come through elements like checkboxes,line edits, buttons etc.
    What you intend to do should be clearly explained to clear your confusion.
    Since you are still trying out examples. I suggest you leave out cin and cout for experimenting in the beginning.
    Elaborate your question on a field for clearer understanding

    https://wiki.qt.io/Qt_for_Beginners
    Also this should help.

Similar Threads

  1. Replies: 0
    Last Post: 5th December 2013, 06:46
  2. Replies: 2
    Last Post: 3rd January 2012, 11:21
  3. Replies: 1
    Last Post: 12th November 2011, 01:01
  4. Replies: 6
    Last Post: 13th July 2011, 19:10
  5. QGraphicsScene doesn't accept Drops
    By momesana in forum Qt Programming
    Replies: 5
    Last Post: 15th July 2007, 10:43

Tags for this Thread

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.