Results 1 to 2 of 2

Thread: Where to begin?

  1. #1
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Where to begin?

    I need some pointers. What I want to reach: create UI using a resource editor (Qt designer here) and write the code myself. I do not want "automatically generated code" anywhere. I would like to keep control on what I am writing. I am more familiar with wxWidgets so what I would do in wxWidgets:

    (1) Start with an empty wxWidgets project.
    (2) Create an .XRC file (in Qt, this should be an .UI file) in wxFormBuilder (in Qt, this should be Qt Designer).
    (3) Write the code. Load the XRC in the main window ctor, get pointers to subordinated widgets, connect, write connect handlers and so on.
    (4) When the app is ready (the UI can change many times in between), embed the UI into the executable along with resources (icons, pictures, other static data).

    Back to Qt. I can start with an empty project and create a simple window without the Designer. I would like to start using Designer but where to begin? I tried "New File -> Qt -> Main Window" from the Creator and I got a "panel" without a titlebar. Starting a stand alone Designer, I really got a main window. The main window seems to already contain a grid sizer but when I do not want it (box sizer is enough)? Is it possible to start creating the UI from the Creator and let the Creator to handle project dependencies? I would like the following:

    (1) Start with an empty Qt project, fill in base info (template, target, QT) - I am able of it.
    (2) Start Designer from the Creator and create the UI script - how exactly?
    (3) Write the code. Load the UI in the main window ctor - I have seen some snippets that seem to be usable.
    (4) When the app is ready, embed UI and resources in the executable - this is far away and not important now but I am keeping in mind that I will do it later.

  2. The following user says thank you to Radek for this useful post:


  3. #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: Where to begin?

    Quote Originally Posted by Radek View Post
    I need some pointers. What I want to reach: create UI using a resource editor (Qt designer here) and write the code myself. I do not want "automatically generated code" anywhere.
    Well, you can't have both because the result of what you get from Qt Designer is auto-generated code.

    I would like to keep control on what I am writing. I am more familiar with wxWidgets so what I would do in wxWidgets:

    (1) Start with an empty wxWidgets project.
    (2) Create an .XRC file (in Qt, this should be an .UI file) in wxFormBuilder (in Qt, this should be Qt Designer).
    (3) Write the code. Load the XRC in the main window ctor, get pointers to subordinated widgets, connect, write connect handlers and so on.
    (4) When the app is ready (the UI can change many times in between), embed the UI into the executable along with resources (icons, pictures, other static data).
    I'd suggest not comparing those two frameworks and ways of using them as they are different.

    I'd also suggest to start by analyzing a couple of examples that come with Qt that contain bits of what you want to achieve.
    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.


  4. The following user says thank you to wysota for this useful post:


Similar Threads

  1. QPainter::begin: Cannot paint on a null pixmap
    By sabeesh in forum Qt Programming
    Replies: 5
    Last Post: 27th July 2010, 18:03
  2. go to file's begin
    By jaca in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2009, 05:59
  3. problem in QPainter::begin
    By wagmare in forum Qt Programming
    Replies: 5
    Last Post: 17th July 2009, 10:31
  4. QHttp RequestStarted does not even begin!
    By Arsenic in forum Qt Programming
    Replies: 6
    Last Post: 9th August 2008, 03:52
  5. Application optimization - Where to begin?
    By Tux-Slack in forum General Programming
    Replies: 2
    Last Post: 19th October 2007, 01:38

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.