Results 1 to 13 of 13

Thread: How to create .ui file from hand written header and source files only.

Hybrid View

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

    Default Re: How to create .ui file from hand written header and source files only.

    I have a tool that is more or less able to do it but at a current state it would require your dialogs to use layouts which I doubt they do, if I correctly interpret what you say. Besides the tool is not free. I could probably do the translation for you but not for free.
    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.


  2. #2
    Join Date
    Mar 2011
    Location
    Narvik, Norway
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to create .ui file from hand written header and source files only.

    I think I use layouts =)
    Example1:
    Qt Code:
    1. MainWindow::MainWindow(QWidget *parent)
    2. : QMainWindow(parent), mdir("messages.txt")
    3. {
    4.  
    5. QTabWidget* tabw = new QTabWidget;
    6. QWidget* cpwidget = new QWidget;
    7. QVBoxLayout* playout = new QVBoxLayout;
    8. QGridLayout* pgrid = new QGridLayout;
    9.  
    10. socket = new LHCPSocket;
    11. QWidget* cwidget = new QWidget;
    12. QVBoxLayout* toplayout = new QVBoxLayout;
    13. QGridLayout* grid = new QGridLayout;
    To copy to clipboard, switch view to plain text mode 

    Example2:
    Qt Code:
    1. toplayout->addWidget(new ConnectBar(socket,mdir.getMsgInfo("SHUTDOWN_SERVER")));
    2. toplayout->addWidget(map);
    3. toplayout->addWidget(supportb);
    To copy to clipboard, switch view to plain text mode 

    Due to copyright material I can't post more "explaining" code... but maby this helped you a bit?

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

    Default Re: How to create .ui file from hand written header and source files only.

    Yeah, I should be able to do the translation although we might have a problem with those custom widgets of yours. It's not a show-stopper though. With a bit of manual editing it should be fine. Of course for example line #1 of your second snippet is not possible to be fully translated to ui. You'd need a default constructor for your ConnectBar widget. Note though I need to be able to run your application in order to do the translation.
    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:

    Badeand (22nd March 2011)

  5. #4
    Join Date
    Mar 2011
    Location
    Narvik, Norway
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to create .ui file from hand written header and source files only.

    Quote Originally Posted by wysota View Post
    Yeah, I should be able to do the translation although we might have a problem with those custom widgets of yours. It's not a show-stopper though. With a bit of manual editing it should be fine. Of course for example line #1 of your second snippet is not possible to be fully translated to ui. You'd need a default constructor for your ConnectBar widget. Note though I need to be able to run your application in order to do the translation.
    I would love this, but unfortunately I am not allowed to share my code with anyone (I had to sign a lot of documents when I started working with this) so I guess I am on my own here, but thanks for trying to help.

Similar Threads

  1. How to create an animated GIF file with some BMP files?
    By accordionist in forum General Programming
    Replies: 2
    Last Post: 30th December 2010, 12:25
  2. How to create an animated GIF file with some BMP files?
    By accordionist in forum Qt Programming
    Replies: 0
    Last Post: 30th December 2010, 06:48
  3. Replies: 2
    Last Post: 1st March 2010, 17:58
  4. qmake using source files not in .pro file
    By Asperamanca in forum Newbie
    Replies: 12
    Last Post: 9th July 2009, 15:29
  5. Adding QPushButton to *.ui file by hand
    By s410i in forum Qt Programming
    Replies: 3
    Last Post: 23rd June 2009, 13:08

Tags for this Thread

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.