Qt Visual Studio Add-in:Adding Form Files to the Project

來源:互聯網
上載者:User

The Visual Studio Add-in lets you launch Qt Designer simply by double-clicking on a .ui file. See the Qt Designer manual} for more information.

To add a new .ui file to the project, select Project|Add New Item and then select the Qt Widget Form or the Qt Dialog Form template from the Qt Project Items folder.

Normally, you will need to wrap the code generated for the form file into a QWidget subclass to add signals or slots to it. A convenient way to do this is to select Project|Add Class and then selectQt4GuiClass from the Qt4Classes folder. This will create a .ui file, a .h file, and a .cpp file for you.


Creating Form Templates

You can add customized form templates by following these steps:

  • Create a form in the Qt Designer and save the .ui file (e.g. mydialog.ui).
  • Copy mydialog.ui to the uiItems\ directory within the Qt Visual Studio Add-in installation directory.
  • Create an icon file named mydialog.ico. It should have a size of 32x32 pixels.

After the next start of Visual Studio you can add new forms using your custom template.

 

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.