qt-creator

How can I prevent QDialog class from closing

感情迁移 提交于 2019-12-19 19:48:14
问题 How can I prevent QDialog class from closing after "Ok" button was pressed? I need to close the window only if the some actions were performed correctly on this dialog, in other cases I don't need to close this window. 回答1: Generally speaking, it's a bad habit to lie to the user. If a button is not disabled, then it better work when the user clicks on it. So, the obvious solution is to disable the button until the necessary preconditions are met. For buttons that finish the dialog, you should

How can I prevent QDialog class from closing

回眸只為那壹抹淺笑 提交于 2019-12-19 19:48:02
问题 How can I prevent QDialog class from closing after "Ok" button was pressed? I need to close the window only if the some actions were performed correctly on this dialog, in other cases I don't need to close this window. 回答1: Generally speaking, it's a bad habit to lie to the user. If a button is not disabled, then it better work when the user clicks on it. So, the obvious solution is to disable the button until the necessary preconditions are met. For buttons that finish the dialog, you should

Qt Creator 5 - No debugger set up

妖精的绣舞 提交于 2019-12-19 17:48:11
问题 I was seted up a compiler to Microsoft Visual C++ x86 Compiler , but now i have this error: The compiler "Microsoft Visual C++ x86 Compiler" cannot produce code for the Qt version. Warning: No debugger set up I guess that i need to set debugger, but i don't know which path to put Debugger tab. I have installed Visual Studio 2012. 回答1: For binary version of SDK, you need MSVS2010, Express version should be ok. SP1 must be installed on top of these too. For debugging you also need to install

qmake .pro file not parsed correctly to generate LD_LIBRARY_PATH

谁说我不能喝 提交于 2019-12-19 10:58:08
问题 I have been trying in the last days to understand how qmake works buy I'm stuck. I want a project with the following structure: root bin testjson lib libjson.so src testjson.cpp All i wanted was to test the json library. I have created a new empty project in Qt Creator 2.3.0, and set up all the settings so the executable will run. Tested what I wanted and closed the application. Later, when I opened Qt Creator again, I loaded the .pro file and surprise, when I try to run the project I get

Qt Creator 2.8.1 + MSVC 2013 Express = No compiler can produce code for this Qt version

我与影子孤独终老i 提交于 2019-12-19 05:33:19
问题 This question was asked on this thread, but is was closed as "off topic", which is confusing to me. This not a question looking for an opinion. This is a legitimate issue with concrete details and no doubt has a concrete answer. I'm setting up a new windows 8.1 laptop. I've installed MSVC 2013 express (Windows Desktop version). And I've installed Qt 5.1.1. In Qt Creator when I go to Tools -> Options -> Build & Run -> Compilers and hover the mouse over the auto-detected compiler: "Microsoft

Breakpoint: Break when c++ exception is thrown - why so slow?

感情迁移 提交于 2019-12-19 04:46:22
问题 Using Qt Creator, Qt 5.3, VC12 (VS2013) When I set a "Break when c++ exception is thrown" breakpoint in Qt creator, my application becomes extremely slow. Maybe 5-10 slower than running with other breakpoints such as "File name and line number" Why is debugging with this kind of breakpoint so slow? Just curious .. -- Edit -- As of CR's comment, do I face an abnormality on my system? 回答1: It is a problem with the Microsoft-provided debugger that you have downloaded to use with Qt Creator. The

Breakpoint: Break when c++ exception is thrown - why so slow?

♀尐吖头ヾ 提交于 2019-12-19 04:46:10
问题 Using Qt Creator, Qt 5.3, VC12 (VS2013) When I set a "Break when c++ exception is thrown" breakpoint in Qt creator, my application becomes extremely slow. Maybe 5-10 slower than running with other breakpoints such as "File name and line number" Why is debugging with this kind of breakpoint so slow? Just curious .. -- Edit -- As of CR's comment, do I face an abnormality on my system? 回答1: It is a problem with the Microsoft-provided debugger that you have downloaded to use with Qt Creator. The

Setup GDB with QtCreator

谁说我不能喝 提交于 2019-12-18 19:31:13
问题 I have a simple project using OpenCV and cmake, and has two source files only segmentation.h and segmentation.cpp. Here is the cmakefile: project(Segment) cmake_minimum_required(VERSION 2.8) SET(CMAKE_BUILD_TYPE Debug) SET(CMAKE_VERBOSE_MAKEFILE true) if(CMAKE_COMPILER_IS_GNUCXX) message(STATUS "GCC detected, adding compile flags") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -std=c++98 -Wall") endif(CMAKE_COMPILER_IS_GNUCXX) find_package(OpenCV REQUIRED) add_executable(Lulu segmentation

Setup GDB with QtCreator

此生再无相见时 提交于 2019-12-18 19:31:04
问题 I have a simple project using OpenCV and cmake, and has two source files only segmentation.h and segmentation.cpp. Here is the cmakefile: project(Segment) cmake_minimum_required(VERSION 2.8) SET(CMAKE_BUILD_TYPE Debug) SET(CMAKE_VERBOSE_MAKEFILE true) if(CMAKE_COMPILER_IS_GNUCXX) message(STATUS "GCC detected, adding compile flags") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -std=c++98 -Wall") endif(CMAKE_COMPILER_IS_GNUCXX) find_package(OpenCV REQUIRED) add_executable(Lulu segmentation

Using Cmake with Qt Creator

一曲冷凌霜 提交于 2019-12-18 12:55:10
问题 I would like to use Qt creator and Cmake together (please, don't ask me about my motivation, accept this as a given.) I successfully set up Qt creator to use cmake "Cmake": see this, this and this documents regarding how I did that. I successfully create hello world project, but I can't create files in project, only add existing files to project tree and after that adding it to cmake list. Standard operation of Qt creator "Add New..." doesn't work and I can't find why. Is there anybody who