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. CMake and QTCreator designer
Forum Updated to NodeBB v4.3 + New Features

CMake and QTCreator designer

Scheduled Pinned Locked Moved Qt Creator and other tools
cmakeqt5
1 Posts 1 Posters 606 Views 2 Watching
  • 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.
  • David.GD Offline
    David.GD Offline
    David.G
    wrote on last edited by
    #1

    Hey,

    Recently I've started using CMake and I've been configuring it for a while. After I was done I noticed that QTCreator can't see any of the changes I've done to the .UI files and I have to rebuild the project to see ui_HeaderFile.hh. Plus I also can't use the Right click -> Go to slot freely

    I've kept things as simple as possible. Note that I'm still learning the ropes with CMake so I've probably missed plenty of things

    Files here:

    Top level:

    cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
    
    project(Mumbli)
    
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
    set(CMAKE_AUTOMOC ON)
    
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
    
    find_package(Qt5Widgets REQUIRED)
    find_package(QT5Core REQUIRED)
    find_package(QT5Gui REQUIRED)
    add_definitions(${Qt5Widgets_DEFINITIONS})
    
    add_subdirectory(Source)
    

    Within Source folder

    set(mumbli_src 
    	main.cc
    	Gui/mumbli.cc
    )
    
    set(mumbli_headers
    	Gui/mumbli.hh
    )
    
    set(mumbli_uis
    	Gui/mumbli.ui
    )
    
    qt5_wrap_ui(gen_uis ${mumbli_uis})
    
    INCLUDE_DIRECTORIES(
        Gui
    )
    add_executable(mumbli ${mumbli_src} ${mumbli_headers} ${gen_uis} )
    
    target_link_libraries(mumbli Qt5::Widgets)
    

    If this is the intended behavior, please let me know.

    1 Reply Last reply
    0

    • Login

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