qt-creator

Losing style when adding specificity to a Qt stylesheet

流过昼夜 提交于 2019-12-11 12:50:22
问题 Here's my code: const QString STYLE_SHEET = "background-color: rgba(x,x,x,y);" "border: 1px solid gray;" "border-radius: 0px;" "border-top: 1px solid red;" "border-bottom: 1px solid blue;" "border-radius: 0px;"; The SS is applied later in the code like this: QWidget * myWidget; myWidget = new QWidget(parent); myWidget.setObjectName("myWidgetName"); myWidget.setStyleSheet(STYLE_SHEET); It works like a champ except that the borders bleed into a child QFrame. If I add specificity to STYLE_SHEET

How to find the variables button in Qt creator

非 Y 不嫁゛ 提交于 2019-12-11 12:46:01
问题 I'm reading Qt Documentation, Specifying Build Settings section. Under the 'Using Qt Creator Variables' I found following sentence. Select the (Variables) button in a field to select from a list of variables that are available in a particular context. But I found no Variables button in Qt Creator 3.3.0. Just found the same question asked in a forum. Can anybody explain me what it is or where I can find the button? 回答1: You can use SIGNAL AND SLOT Drop in form some button, cpp file .

[ERROR]:CallNamedPipe failed. Error=2 (Qt)

前提是你 提交于 2019-12-11 11:45:13
问题 After open a new Qt GUI application project, I run this new project directly without adding any code or changing any settings, however I always get an error message : [ERROR]:CallNamedPipe failed. Error=2 And this is the screen shot of running the same project in the debug mode: It seems that the GUI can run successfully but I really don’t have a clue where this error might come from. Thank you in advance! 来源: https://stackoverflow.com/questions/20968829/errorcallnamedpipe-failed-error-2-qt

How to solve module “”QtQuick.Controls“ version 2.0 is not installed” on mac

自古美人都是妖i 提交于 2019-12-11 11:03:57
问题 I've been getting the error "module "QtQuick.Controls" version 2.0 is not installed" on Qt Creator 5.6.13, so i upgraded to 5.11.2 and i'm still getting it. Here's the part causing it: import QtQuick.Controls 2.0 Thank you for your help. 回答1: Make sure you activated your Qt kit in Projects > Build & Run as follow: 回答2: Ok so, I was building with the Qt Creator 5.6.3 compiler. Projects => Build & Run => change to the corresponding kit . 来源: https://stackoverflow.com/questions/53374106/how-to

How to properly configure MSVC's compiler options with QtCreator?

a 夏天 提交于 2019-12-11 10:06:00
问题 I'm trying to migrate from Visual Studio 2008 to QtCreator in a project that uses C++/CLI extensions. This just means that I need to use the -clr compiler option when compiling my files. I've managed to add it by adding the following line to my project.pro file: QMAKE_CXXFLAGS += -clr However, there is a conflicting option in my compiler's call that is conflicting with this one. It is the -EHsc option. But I can't find where these options get included and how to disable it. My default call to

Qt Include and QMake error

最后都变了- 提交于 2019-12-11 09:52:18
问题 Qt was messing up on Windows so I deleted it and re installed it with the qt libraries and Qt Creator. Now, whenever I try to open my old project, I get the error that "Qmake is does not exist or is not executable", and none of the Qt headers can be located. 回答1: Assuming you're using a recent version of Qt, such as version 4.7.4, and a recent version of Qt Creator, such as the branch 2.3 .*. Probably somewhere in this process, Qt Creator or the settings for this specific project lost the

Qstring replace is not working fine

时光总嘲笑我的痴心妄想 提交于 2019-12-11 08:17:22
问题 i want to replace temp.replace (QString("/"), QString("\")); Here i am getting error error C2001: newline in constant error C2275: 'QString' : illegal use of this type as an expression How can i replace "/" with "\" thakns 4 ur answer. But till now i didnt sort my issue. Please check my code // Convert to a wchar_t* size_t origsize = strlen(toChar) + 1; const size_t newsize = 100; size_t convertedChars = 0; wchar_t wcstring[newsize]; mbstowcs_s(&convertedChars, wcstring, origsize, toChar,

MeeGo Handset Emulator not starting on Windows 7

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 07:49:19
问题 I am trying my hands on the MeeGo and I have downloaded the MeeGo 1.1 SDK for Windows and followed everything step by step given in the MeeGo wiki to install SDK on my Windows 7 System and everything was fine. But when I start the emulator from the Qt Creator IDE or MADDE terminal the emulator screens appears and nothing happens after a startup welcome message as given in below image. My System configurtion are as follows: Operating System : Microsoft Windows 7 Ultimate 32 Bit Processor :

How to correctly set the color of a QPushButton?

ぐ巨炮叔叔 提交于 2019-12-11 07:32:26
问题 I can successfully change the color of a QPushButton using setStyleSheet , but because I'm using QT Creator to make the GUI, every time I run qmake and make, the calls to setStyleSheet disappear. Changing the palette of the button doesn't change its color either. What's the best way to change to color of the button without having to manually change my ui_window.h file every time I qmake? 回答1: Using style sheets is the right way to do, no matter you're using Qt Creator or not. From what you

How to create Web History for my Browser

笑着哭i 提交于 2019-12-11 07:27:02
问题 I'm new to Qt. I am Trying to create a Sample Browser Application. I had created the Browser application. Now i need to create the Web history for my application. I don't know how to do it. can anyone please help me with this. Thanks in advance. 回答1: QWebHistory * QWebView::history () The Arora Browser is based in the QWebView... as mentioned here. This browser is the foundation for the Arora Browser, a simple cross-platform Web browser. I would look at how they implemented their history. In