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 n00b's question: where is the code?
Forum Updated to NodeBB v4.3 + New Features

A n00b's question: where is the code?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 911 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.
  • I Offline
    I Offline
    igorland
    wrote on last edited by
    #1

    Hello World.

    I have been into my 4th day of reading manuals and watching tutorials on developing with Qt. My I ask a dumb question? I have created a stackedWidget with several panels and buttons on them in Qt Creator (C++, MinGW). Now, I go to Edit to edit my code in the main.cpp and find that none of the objects are there. Aren't the widgets supposed to appear in main.cpp file after they have been created (since you can create them by writing a code directly in main.cpp)?

    Sorry for a silly question but I am confused...

    Thanks!

    Edit: So, as far as I can see, the widget codes are in mainwindow.ui... Should it be either main.cpp or ui?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Code_ReaQtor
      wrote on last edited by
      #2

      Generated .cpp and .h file are hidden by Qt Creator. You can access the widgets in the mainwindow.cpp by using "ui->[nameOfWidget]".

      If you want to see the generated files, they can be found in your source directory.
      Caution: They were not meant to be edited since they change every time you modify the .ui file.

      Please visit my open-source projects at https://github.com/Code-ReaQtor.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        igorland
        wrote on last edited by
        #3

        I see. Thanks a lot!

        Back to exploring... ))

        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