Results 1 to 4 of 4

Thread: "Creating a Qt Widget Based Application"

  1. #1
    Join Date
    Apr 2016
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default "Creating a Qt Widget Based Application"

    Being a complete newbie (I'm using Qt Creator 4.02 with Qt 5.7.0 [32-bit msvc2015] on Windows 7 Pro 64-bit SP1), I decided to start with "Creating a Qt Widget Based Application" at doc.qt.io/qtcreator/creator-writing-program.html .

    Unfortunately, when I get to the step:

    -----

    The on_findButton_clicked() slot is called automatically in the uic generated ui_textfinder.h file by this line of code:

    QMetaObject::connectSlotsByName(TextFinder);

    -----

    there appears to be no ui_textfinder.h file in my project.

    Also, at steps:

    -----

    5. Select Add > Add Prefix.
    6. In the Prefix field, replace the default prefix with a slash (/).
    7. Select Add > Add Files, to locate and add input.txt.

    -----

    there appears to be no "Add" in either the menu or any of the context popups in the code editor.

    The project compiles, but (after entering a keyword in the lineEdit) clicking the Find button seems to do nothing.

    What am I missing?

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "Creating a Qt Widget Based Application"

    ui_*.h files are auto generated from *.ui files in building process.

  3. #3
    Join Date
    Apr 2016
    Posts
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: "Creating a Qt Widget Based Application"

    Quote Originally Posted by Lesiok View Post
    ui_*.h files are auto generated from *.ui files in building process.
    Thank you -

    Why then does the ui_textfinder.h file not show up in the list of files after the successful build?

    And, where is the "Add" button/menu item/popup/whatever in the code editor?

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: "Creating a Qt Widget Based Application"

    The generated files are just build artefacts, like the object file for each C++ source file.

    There is no need to pollute the object tree with those, since not relevant for the programmer as such.

    As for the "Add" button of the resource editor: http://doc.qt.io/vs-addin/vs-addin-m...resources.html

    Cheers,
    _

Similar Threads

  1. Replies: 1
    Last Post: 20th November 2015, 11:02
  2. Replies: 3
    Last Post: 16th March 2015, 08:31
  3. Replies: 15
    Last Post: 14th March 2013, 23:05
  4. Replies: 1
    Last Post: 6th April 2012, 01:08
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05

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.