qt4

QDevelop Qt IDE in Ubuntu 10.04 LTS Lucid Lynx qwt

被刻印的时光 ゝ 提交于 2020-01-17 15:17:26
问题 I am having an issue using the QDevelop, Qt IDE (Qt version 4.6.2) in Ubuntu 10.04 LTS Lucid Lynx. The code I am trying to work with was transfered from a newer 64bit laptop to my 32 bit laptop. Both systems are running the same version of Ubuntu and Qt IDE. When I try building the code I get a long list of errors, which I don't really want to post here but I will at the end of my text. Any help would be greatly appreciated. For whatever reason, my blocks of text are getting cut off. I am

Qt5.5 How to override MousePress event coordinates at Application level

帅比萌擦擦* 提交于 2020-01-17 13:46:12
问题 I'm developing an application on a small Embedding Linux device with Qt5.5. I need to be able to modify the mouse press coordinates received from Linux ( tslib ) in my application. I've tried implementing an event filter in my main view that modifies the mouse coordinate received, creates a new mouse event and submits the new event to the widget. However, in the widget's mousePressEvent function, I see the debug message only once, and it is for the original coordinates received, not my

How can I customize the appearance of the actions in my QToolBar?

南笙酒味 提交于 2020-01-16 05:40:44
问题 I have just changed some toolbars from Q3ToolBars (with QToolButtons explicitly added to them) into Q4 toolbars (with actions added to them straight away instead.) The old tool buttons had a nice outline around them, but this is not displayed in the new version; the QActions in the Q4 toolbar just look like a line of icons. Is there a way to change the 'button' style in the new version (assuming these actions can be considered as such) and give them the outline? I've looked through the

Moving items up and down in a QListWidget?

这一生的挚爱 提交于 2020-01-15 08:22:07
问题 In a QListWidget I have a set of entries. Now I want to allow the user to sort (reorder) these entries through two buttons (Up/Down). Here's part of my code: def __init__(self): QtGui.QMainWindow.__init__(self) self.ventana = Ui_MainWindow() self.ventana.setupUi(self) self.connect(self.ventana.btExit, QtCore.SIGNAL('clicked()'), QtCore.SLOT('close()')) self.connect(self.ventana.btAdd, QtCore.SIGNAL('clicked()'), self.addButton) self.connect(self.ventana.btQuit, QtCore.SIGNAL('clicked()'),

Penalty of using QGraphicsObject vs QGraphicsItem?

久未见 提交于 2020-01-13 09:21:21
问题 I currently have a hierarchy of items based off of QGraphicsItem. I want to move to QGraphicsObject instead so that I can put properties on my items. I will not be making use of signals/slots or any other features of QObject. I'm told that you shouldn't derive from QObject because it's "heavy" and "slow". To test the impact, I derive from QGraphicsObject, add a couple properties to my items, and look at the memory usage of the running app. I create 1000 items using both flavors and I don't

Window Icon of Exe in PyQt4

自古美人都是妖i 提交于 2020-01-13 08:17:14
问题 I have a small program in PyQt4 and I want to compile the program into an Exe. I am using py2exe to do that. I can successfully set icon in the windows title bar using the following code, but when i compile it into exe the icon is lost and i see the default windows application. here is my program: import sys from PyQt4 import QtGui class Icon(QtGui.QWidget): def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.setGeometry(300, 300, 250, 150) self.setWindowTitle('Icon')

How to access QTextDocument pages

旧巷老猫 提交于 2020-01-13 05:45:11
问题 I am trying to build an application that would display rich text documents in paginated fashion - more or less like MS Word does. For now, I would like to have only one page displayed at a time. From this question I have learned that I need to represent the document by QTextDocument. While the author of the question focuses more on the view representation, I would like to learn about accessing document data in paginated fashion. I can see that the class has methods such as setPageSize() and

Make qmake use qt5 by default

我是研究僧i 提交于 2020-01-12 07:35:09
问题 I have both qt4 and qt5 on my Linux system. qt4 is used by default. What is a clean way to change that so that qmake uses qmake-qt5 by default? 回答1: The system might have different meta packages that handle the default. For example on Debian there is a qt4-default and a qt5-default package, installing one of them will uninstall the other and set the symlinks appropriately 回答2: There is a tool named qtchooser to switch between Qt versions. On Debian and Ubuntu you can install it with apt-get

Installing PyQt 4.9 on CentOS 6.0 Fails

拜拜、爱过 提交于 2020-01-11 12:02:28
问题 I'm totally fed up with this problem. I'm trying to install PyQt 4.9 on my server running on CentOS 6.0. When I install it, I get like this [root@myserver PyQt]# python3 configure.py -k Determining the layout of your Qt installation... This is the GPL version of PyQt 4.9 (licensed under the GNU General Public License) for Python 3.2.2 on linux2. Type '2' to view the GPL v2 license. Type '3' to view the GPL v3 license. Type 'yes' to accept the terms of the license. Type 'no' to decline the

Qt setPermissions not setting permisions

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-11 10:13:12
问题 I'm not sure why but my code bellow does not set permissions for a file. Not sure what could be wrong with the code. SYSTEM: Windows XP Pro SP2. Running in Admin account as admin. Newest Qt framework and files. //Get file permissions of ref file. QFile::Permissions qpPerm1; qpPerm1 = QFile::permissions("E:/dir1/dir2/File1.txt"); //Set file permissions of a file. bool isOK=0; isOK = QFile::setPermissions("E:/dir4/dir5/file2.txt",qpPerm1); qout << "Perms set? " << isOK << endl; Return value is