Results 1 to 3 of 3

Thread: is the *ui Creator specific? Can it be avoided?

  1. #1

    Default is the *ui Creator specific? Can it be avoided?

    Hi, as said in other thread I am completely new to Qt and UI programming as well.

    I've seen some examples and mostly the widgets are put directly in the window class inherited from QMainWindow.
    e.g.: window.lineEdit ...

    I played around with the creator and it seems like it uses a additional *ui which points to ui_window and accessing those basic widgets is done by window.ui->lineEdit.

    Is this *ui specific to applications created with the Creator? Is this some recent concept change? Can the Creator add the widgets directly in the window?

    rgds
    kk

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: is the *ui Creator specific? Can it be avoided?

    You can decide which of the three standard approaches Creator takes when autogenerating widget implementation in Designer group of Creator's settings.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: is the *ui Creator specific? Can it be avoided?

    The use of ui member pointer can be avoided,
    but it's the most recommended way to "integrate" the auto-generated (by uic) class into your code, by that i mean:
    1) it's easier to understand then multiple inheritance
    2) it needs a few lines of code to write for keeping the pointer a private member (separate the UI and the code) and this means that you ensure that the UI can be changed without changing the code using it.
    Last edited by Zlatomir; 11th June 2010 at 19:29.

Similar Threads

  1. Searching a QTableView for a specific row
    By GreyGeek in forum Qt Programming
    Replies: 4
    Last Post: 20th March 2013, 12:51
  2. XML Getting attributes of a specific value
    By di_zou in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2009, 12:04
  3. Plotting specific points with qwt
    By byb810 in forum Qwt
    Replies: 0
    Last Post: 30th July 2009, 15:42
  4. Problem with specific font
    By ratsrcute in forum Qt Programming
    Replies: 1
    Last Post: 21st February 2009, 14:57
  5. Looking for a specific webcam...
    By hickscorp in forum General Discussion
    Replies: 0
    Last Post: 24th January 2008, 16:07

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
  •  
Qt is a trademark of The Qt Company.