qt4

Found unsuitable Qt version “5.12.4” from C:/Qt/5.12.4/msvc2015_64/bin/qmake.exe when configuring Eigen 3.3.7 using CMake

流过昼夜 提交于 2020-01-06 06:59:10
问题 Environment: Windows 10 version 1903, 64 bit CMake 3.15.3 Qt 5.12.4 Eigen 3.3.7 Visual Studio 2015 Update 3 Issue: When I run cmake -G"Visual Studio 14 2015 Win64" .. in build folder created in Eigen 3.3.7 root folder, I got the following error message: -- Found unsuitable Qt version "5.12.4" from C:/Qt/5.12.4/msvc2015_64/bin/qmake.exe -- Qt4 not found, so disabling the mandelbrot and opengl demos I have googled for days but the articles are either about other platforms or do not work. For

Using PyQt4 with bbfreeze - wrong ui style used

亡梦爱人 提交于 2020-01-06 06:52:36
问题 So to give a little context, my goal here is to produce a binary which will run my Python/PyQt4 application on any recent linux (but mainly ubuntu), without requiring the user to install the pyqt4 or pyqwt5 library. (If anyone can give a better way to do that than my method below, that would be great also :) I've got this mostly working with bbfreeze by installing an ubuntu 8.04 virtual machine (the resulting code from bbfreeze will not run on a system with an older glibc installation),

Why is PyQt connect() syntax so verbose?

南笙酒味 提交于 2020-01-06 06:40:30
问题 I'm just learning PyQt and looking at the Signals and Slots mechanism. I'm a bit baffled by the verbose syntax. Why do we have: self.connect(dial, SIGNAL("valueChanged(int)"), spinbox.setValue) I would much prefer to write the following: self.connect(dial.valueChanged, spinbox.setValue) Can anyone tell me why the connect() syntax needs to be so explicit/verbose? 回答1: You can use PyQt's new style signals which are less verbose: self.connect(dial, SIGNAL("valueChanged(int)"), spinbox.setValue)

Force compilation with qt4 even if qt5 is installed

十年热恋 提交于 2020-01-06 04:25:18
问题 I'm on Ubuntu 14.04 and have both qt4 and qt5 installed (from the repositories). I thought I could switch between building with qt5 to building with qt4 simply with sudo apt-get install qt4-default But the program still builds with Qt5 and gives error because it only supports Qt4. I checked the qmake version and after qt4-default is installed it gives $ qmake --version QMake version 2.01a Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu I'm building with CMake in case that is useful. Also,

Segmentation fault when changing default gateway

孤街醉人 提交于 2020-01-06 03:50:22
问题 I wrote a simple application on Qt4 that modifier network adapter parameters, for that I have a slot called setInterfaceParams , implemented as so: DWORD WinNetInterface::setInterfaceParams(QString index, QString ip, QString netmask, QString gateway) { DWORD res = NULL; HINSTANCE lib = (HINSTANCE) LoadLibrary((WCHAR *)"iphlpapi.dll"); _SetAdapterIpAddress SetAdapterIpAddress = (_SetAdapterIpAddress) GetProcAddress(lib, "SetAdapterIpAddress"); PWSTR pszGUID = NULL; //char *szGUID = (char *

Finding the end of a Drag and Drop operation in QAbstractItemView

对着背影说爱祢 提交于 2020-01-05 10:33:42
问题 I created custom proxy model inherited by QSortFilterProxyModel. My source model for the above mentioned proxy model is also a custom model inherited by QAbstractTableModel. Then I set my custom proxy model to a QTableView. In this custom proxy model, I reimplemented the mimeData(..) function. It is as follows. QMimeData* CustomProxyModel::mimeData( const QModelIndexList & rListIndexes ) const { QMimeData *pMimeData = new QMimeData(); //some code here connect(pMimeData, SIGNAL( destroyed

QTreeView with columns

拥有回忆 提交于 2020-01-05 10:28:47
问题 I have these messages received on the can bus which need to be displayed on a suitable Qt Widget (Please refer attached picture). It seems I can use QTreeView for it. I need to show a tree which contains many messages as shown in attached picture. Each row will contain information about the received message. It should consist of columns : Length Time of receiving Message ID Name of the message Message content and when I expand message it should its different signals. How can I make a

Writing XML Nodes in QtXML (QDomElement)

人走茶凉 提交于 2020-01-05 07:50:37
问题 I would like to write Nodes like <name>Peter</name> (with start and end tag) into a QDomDocument. When I create QDomElements and append them as child to a parent element: QDomElement node = doc.createElement("node"); parent.appendChild(node); They are added as <node/> to the parent element. The parent automatically gets a start and end tag so the file would look like this: <parent> <node/> </parent> But how do I add a value to my node so that it looks like I want it (with value between start

How to force QLocale::system to change

試著忘記壹切 提交于 2020-01-04 10:38:28
问题 I need to test my application translation to non-English language very often, and this is very uncomfortable to change the whole operating system language just to do this simple check. How can i change Qt-detected system language using environment variables for example? or with command-line parameter. I try to change LANG , LANGUAGE environment variables, but it has no effect. However, under GNOME it has! UPD: code i'm using such code to determine the system locale and load appropriate

Populating QVector from QList

六眼飞鱼酱① 提交于 2020-01-04 08:16:28
问题 I have a QList and QVector. I populate Qlist and then tried to copy to QVector. Ovector has a fromList() method. But it do not work. My code : QList<int> listA; QVector<int> vectorA; //I also tried QVector<int>vectorA(100); for(int i=0; i<100; i++) { listA.append(i); } vectorA.fromList(listA); After this code vectorA returns empty I use Qt 4.8.5 under Linux 回答1: You should write: vectorA = QVector::fromList(listA); as fromList is a static method of the class QVector . The code you wrote