Qt Visual Studio add-in: Adding form files to the Project

Source: Internet
Author: User
Tags qt designer

The Visual Studio add-in lets you launchQt designerSimply by double-clicking on. UIFile. SeeQt designerManual} for more information.

To add a new. UIFile to the project, selectProject | add new itemAnd then selectQt widget formOrQt dialog formTemplate fromQt project itemsFolder.

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 selectProject | add classAnd then selectQt4guiclassFromQt4classesFolder. This will create. UIFile,. HFile, and. CppFile for you.


Creating form templates

You can add customized form templates by following these steps:

  • Create a form inQt designerAnd save. UIFile (e.g.Mydialog. UI).
  • CopyMydialog. UIToUiitems \Directory within the QT Visual Studio add-in installation directory.
  • Create an icon file namedMydialog. ICO. It shoshould have a size of 32x32 pixels.

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

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.