Results 1 to 2 of 2

Thread: Creating UI elements with Codes

  1. #1
    Join Date
    Aug 2011
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Post Creating UI elements with Codes

    I have read and watch numerous, ALOT, of tutorial certified qt videos.
    i have a general idea of how to create UI elements with code, but the ONE and i believe most important thing they don't mention, is where do you place that piece of code...
    Let's say i want to create a LineEdit in a form called LOLApp.UI
    where DO i place this code
    Qt Code:
    1. //this is an example not a real code... writing it on the fly
    2. void LOLapp::createAButton() {
    3. QPushButton *newButton ...... etc etc
    4. }
    To copy to clipboard, switch view to plain text mode 

    now where do i place this code? LOLApp.cpp, LOLApp.h, main.cpp?
    if u need more info tell me...

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

    Default Re: Creating UI elements with Codes

    Eeeem.... you put the code in a place where you want to create the object. You should be the one to decide where that should be. However another question is why do you want to create objects in code if you are using UI files.
    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.


Similar Threads

  1. Replies: 2
    Last Post: 22nd April 2011, 00:39
  2. ISO 639-2 language codes
    By brixton in forum Qt Programming
    Replies: 2
    Last Post: 23rd November 2010, 21:52
  3. Creating QUAD Elements would openGL be better than Qt
    By sujan.dasmahapatra in forum General Programming
    Replies: 4
    Last Post: 17th October 2009, 10:49
  4. QR codes
    By jcr in forum General Programming
    Replies: 0
    Last Post: 16th May 2006, 05:02
  5. Key codes
    By impeteperry in forum Qt Programming
    Replies: 4
    Last Post: 28th April 2006, 18:35

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.