Results 1 to 3 of 3

Thread: Integrate Wt into Qt Creator. How can I change the Qt UI designer parser to make Wt a

  1. #1
    Join Date
    Mar 2012
    Posts
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Integrate Wt into Qt Creator. How can I change the Qt UI designer parser to make Wt a

    0 down vote favorite


    I want to know if is possible to change the way how the Qt Ui Designers create the C++ code.

    For example when I add a pushbutton to the Ui this is converted to

    Qt Code:
    1. pushButton = new QPushButton(centralWidget);
    2. pushButton->setObjectName(QString::fromUtf8("pushButton"));
    3. pushButton->setGeometry(QRect(70, 90, 97, 27));
    4.  
    5. void retranslateUi(QMainWindow *MainWindow)
    6. {
    7.  
    8. pushButton_2->setText(QApplication::translate("MainWindow", "hola", 0, QApplication::UnicodeUTF8));
    To copy to clipboard, switch view to plain text mode 

    An I want that the Qt Ui Designer parser convert this text into the next one

    Qt Code:
    1. pushButton = new Wt::WPushButton("Some Text",root());
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Oct 2009
    Location
    Mexico
    Posts
    81
    Thanks
    6
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Integrate Wt into Qt Creator. How can I change the Qt UI designer parser to make

    In Qt Creator you can "morp" any widget to others similar. In this case you can add a QPushButton and morph to Wt::WPushButton.

    but I do not think that's enough, actually what is needed to create a custom patcher for the output file designer, manually convert the XML to c++ code.
    Morphing widgets in designer and then parser the XML file. I see this approach in una project, generate the UI in Qt Designer and the parse to generate java code.

    this link contain the format of the UI XML file UI XML format
    Last edited by ecanela; 17th August 2012 at 07:39. Reason: updated contents

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Integrate Wt into Qt Creator. How can I change the Qt UI designer parser to make

    Wt is not a drop-in replacement for Qt. You would need to provide your own version of uic that generated different code and then tell QMake to use it in place of the real uic (see QMAKE_UIC) variable. You'd also need to provide you own Designer plugins to provide the Wt widgets and their properties, which are not the same as similar Qt widgets.

Similar Threads

  1. How to integrate QWT 6.0 with QT Creator 2.01??
    By balutvm in forum Qt Programming
    Replies: 0
    Last Post: 16th December 2010, 12:43
  2. Integrate Designer into own Ui
    By NoRulez in forum Qt Programming
    Replies: 9
    Last Post: 14th July 2010, 14:48
  3. How to Integrate Qt Designer to a Qt project?
    By adamsakli in forum Qt Tools
    Replies: 1
    Last Post: 12th March 2010, 13:52
  4. Replies: 0
    Last Post: 27th March 2009, 14:08

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.