Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. The question about configure Qt Creator

The question about configure Qt Creator

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 1.3k 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.
  • N Offline
    N Offline
    nimingzhe2008
    wrote on last edited by
    #1

    Hello,
    I used Qt Creator to create a Qt Widget project.here is my code:
    main.cpp
    @#include <QtGui>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    QWidget widget;
    QLineEdit *lineEdit = new QLineEdit;
    QLabel *label = new QLabel;
    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget( lineEdit );
    layout->addWidget( label );
    widget.setLayout( layout );
    widget.show();

    return a.exec&#40;&#41;;
    

    }@
    When I compiled the project,nothing happened.I don't why.
    Thank you for your attention.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sam
      wrote on last edited by
      #2

      I just copy and pasted the same code in main.cpp and its working fine.

      What steps do you follow ?

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nimingzhe2008
        wrote on last edited by
        #3

        My Qt Creator is 2.4.1.My step is as default.Now I create an empty project and compile the code,it works well.

        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