Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A simple console program "hello word" doesnt work!
Forum Updated to NodeBB v4.3 + New Features

A simple console program "hello word" doesnt work!

Scheduled Pinned Locked Moved General and Desktop
16 Posts 5 Posters 4.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sam
    wrote on last edited by
    #2

    You can try with removing the console terminal to get the output in "Application Output" pane

    On the left panel Goto Projects-> Run Settings->Uncheck Run in Terminal.

    P.S

    The code works as intended.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hor_313
      wrote on last edited by
      #3

      Thanks dear!

      I did that But i get this result :

      !http://up.download.ir/di-HALB.png(pic)!

      I cant enter values for Cin function .

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qxoz
        wrote on last edited by
        #4

        Hi!
        Check Options - >General - >System
        what settings are there?
        Probably it is relevant to "QTCREATORBUG-1633":https://bugreports.qt-project.org/browse/QTCREATORBUG-1633

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bruceoutdoors
          wrote on last edited by
          #5

          isn't that bug... resolved?

          How bout a look into ur *.pro file? Maybe that can give us an idea on what's wrong with the application. In windows, a line

          @
          CONFIG += console
          @

          needed to be added for the terminal to display anything.

          Then again, you're using Ubuntu.

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            qxoz
            wrote on last edited by
            #6

            I think hor_313 use old Nokia QtSDK 1.2.1

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hor_313
              wrote on last edited by
              #7

              This is the .pro file of my project image :

              !http://up.download.ir/di-3HWJ.png(pic)!

              I ran the OpenCV example and I could load an image in window but I couldnt show texts in terminal window

              1 Reply Last reply
              0
              • Q Offline
                Q Offline
                qxoz
                wrote on last edited by
                #8

                Did you check the settings?

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hor_313
                  wrote on last edited by
                  #9

                  [quote author="qxoz" date="1368782853"]Did you check the settings?[/quote]

                  I cant find the general setting you said that

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    hor_313
                    wrote on last edited by
                    #10

                    I use Qt 4.8 and ubuntu 12.04

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      Ben__
                      wrote on last edited by
                      #11

                      is there any possibility that your "LIBS += ....." is wrong..
                      because i did exactly with you except the LIBS+= stuff , and i got the correct result...

                      1 Reply Last reply
                      0
                      • Q Offline
                        Q Offline
                        qxoz
                        wrote on last edited by
                        #12

                        [quote author="hor_313" date="1368784889"]
                        I cant find the general setting you said that[/quote]
                        Tools - > Options – >Environment - > General – >System - > Terminal
                        threre should be writen xterm -e

                        [quote author="Ben__" date="1368785346"]is there any possibility that your "LIBS += ....." is wrong..
                        because i did exactly with you except the LIBS+= stuff , and i got the correct result...[/quote]
                        Wrong libs give a link errors.

                        1 Reply Last reply
                        0
                        • H Offline
                          H Offline
                          hor_313
                          wrote on last edited by
                          #13

                          [quote author="qxoz" date="1368789242"][quote author="hor_313" date="1368784889"]
                          I cant find the general setting you said that[/quote]
                          Tools - > Options – >Environment - > General – >System - > Terminal
                          threre should be writen xterm -e

                          [quote author="Ben__" date="1368785346"]is there any possibility that your "LIBS += ....." is wrong..
                          because i did exactly with you except the LIBS+= stuff , and i got the correct result...[/quote]
                          Wrong libs give a link errors.

                          [/quote]

                          !http://up.download.ir/di-QBNT.png(pic)!
                          [quote author="qxoz" date="1368789242"][quote author="hor_313" date="1368784889"]
                          I cant find the general setting you said that[/quote]
                          Tools - > Options – >Environment - > General – >System - > Terminal
                          threre should be writen xterm -e

                          [quote author="Ben__" date="1368785346"]is there any possibility that your "LIBS += ....." is wrong..
                          because i did exactly with you except the LIBS+= stuff , and i got the correct result...[/quote]
                          Wrong libs give a link errors.

                          [/quote]

                          [quote author="qxoz" date="1368789242"][quote author="hor_313" date="1368784889"]
                          I cant find the general setting you said that[/quote]
                          Tools - > Options – >Environment - > General – >System - > Terminal
                          threre should be writen xterm -e

                          [quote author="Ben__" date="1368785346"]is there any possibility that your "LIBS += ....." is wrong..
                          because i did exactly with you except the LIBS+= stuff , and i got the correct result...[/quote]
                          Wrong libs give a link errors.

                          [/quote]

                          1 Reply Last reply
                          0
                          • Q Offline
                            Q Offline
                            qxoz
                            wrote on last edited by
                            #14

                            Change x-terminal-emulator -e to xterm -e

                            1 Reply Last reply
                            0
                            • H Offline
                              H Offline
                              hor_313
                              wrote on last edited by
                              #15

                              I have changed it . this is the result :

                              !http://up.download.ir/di-99KS.png(p)!

                              1 Reply Last reply
                              0
                              • Q Offline
                                Q Offline
                                qxoz
                                wrote on last edited by
                                #16

                                Unfortunately i am at user level on linux and can't say any useful advises about this error, but did you check is xterm present on you system?

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved