Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to pass option to uic in qmake project file
Forum Updated to NodeBB v4.3 + New Features

How to pass option to uic in qmake project file

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 514 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    acannon
    wrote on last edited by
    #1

    Hello, I am building a project using command line tools in Qt 5.12. I want to pass an option -a (--no-autoconnection) to uic so that it does not generate a call to QMetaObject::connectSlotsByName(Linotype);
    Does anyone know how to specify the uic option in the project file so that qmake will add it to the uic command line in the generated Makefile? I tried adding 'QMAKE_UIC = uic -a' but this has no effect.

    eyllanescE 1 Reply Last reply
    0
    • A acannon

      Hello, I am building a project using command line tools in Qt 5.12. I want to pass an option -a (--no-autoconnection) to uic so that it does not generate a call to QMetaObject::connectSlotsByName(Linotype);
      Does anyone know how to specify the uic option in the project file so that qmake will add it to the uic command line in the generated Makefile? I tried adding 'QMAKE_UIC = uic -a' but this has no effect.

      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by eyllanesc
      #2

      @acannon You have to use QMAKE_UIC_FLAGS in your .pro:

      QMAKE_UIC_FLAGS += -a
      

      Delete the build folder and recompile, you will see the following:

      /usr/bin/uic -a ../foo_project/mainwindow.ui -o ui_mainwindow.h
      

      Fore more information read the official docs: https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-uic-flags

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved