Hello Everybody,
I trying to do a Qtreewidget to attend a customer design suggestion. I am coding it on QtPython. I did a first try using Qt Designer, then generated the code. But when I try to run it, an error comes out:
self.centralwidget.setSortingEnabled(__sortingEnabled)
AttributeError: setSortingEnabled
I googled around, but d...
Hello Everybody,
I have a QTreewidget that works fine if I have just one level on my treelist. If I decide to add child sublevels, it gives me an error. Here is the code, that works nice only without the "childs" lines on it (see after "child 1" and "child 2").
def eqpt_centralwdg(self,MainWindow):
self.centralwidget = QtGui.QWidg...
Hi Everybody,
I am developing a project for one customer, where the design has a radio button with exclusive options.
Here is a piece of the code that runs and show two nice radio buttons:
self.performGroupBox = QtGui.QGroupBox(self.centralwidget)
self.performGroupBox.setGeometry(QtCore.QRect(50, 20, 181, 121))
self.perfo...
in qdesigner_workbench.cpp, how can I add a widget (say QLabel) into a FormWindow by code?
Since methods like createWidget()...etc are all abstract, how do I properly use the internal mechanics to add QLabel into the active FormWindow?
EDIT:
In qdesigner_workbench.cpp, this is currently what I have:
QDesignerFormWindowManagerInterfac...
I'm trying to compile the basic tutorial program at http://doc.trolltech.com/4.4/mainwindows-application.html and running into a problem.
Doing things the way the tutorial program does them, gives a compile error:
In file included from debug\moc_mainwindow.cpp:10:
debug\../mainwindow.h:2: error: expected class-name before '{' token
deb...
I have a daemon running on DBus that offers service for launching applications. I want to pass two strings to this service API (appPath, appArgs). I have registered the service and the object path with DBus.
My service method gets called, but I do not receive the arguments properly () in my service. This is how I'm doing it from my adap...
I sucessfully added a QLabel widget into the FormWindow and set a pixmap in code, but when examine the property box the pixmap filepath field was empty even if the image did get loaded properly.
The QPixmap struct has no members holding the path, so this info must be somewhere in the Property Box. How can I access it?
If the pixmap fil...
In Qt an object belongs to the thread on which it has been created.
We need to access controls created in main thread from background thread.
However as soon as we refer the object, application goes into hang state.
Please let me know how to access and modify controls in the different thread which hasn't created the controls.
Thanks in ...
I have a QToolbar with toolButtonStyle set to Qt::ToolButtonTextUnderIcon in which I add a QLineEdit through addWidget(). I'd like to have descriptive text under that widget like I do with other buttons, but I don't know how to do it or if it's even possible. I tried:
lineEdit = QLineEdit()
action = self.toolBar.addWidget(lineEdit)
acti...
In a desktop Qt application, I have some GPS coordinates that I'd like to show on a map. My plan is to construct an URL with the coordinates and let a web browser and Google maps or a similar service do the heavy lifting.
After reading some apparently reverse-engineered documentation at
mapki.com slash wiki slash Google_Map_Parameter...
I'd like to create an application's main window in qt4 designer.
When I add a layout element to the centralwidget, that element stays in the middle of the window and does not move when the window is resized. How can I make it "fill" the whole area (and resize its children properly)? All children widgets of my layout are expanding proper...
Does anybody know how can I customize title bar of a main window in QT? I would like to make some custom painting over the "normal" drawing.
The QT version I'm interested in is 4.5 or 4.6 (beta)
...
Is any posibility to add widgets in titlebar of QMainWindow?
I try to avoid "emulate" a title bar by making a custom widget for that and hiding the default title bar (from Qt::WindowFlags).
I am using QT 4.5 or 4.6 beta.
...
I'd like to exchange a widget inside a QHBoxLayout. This code seems to work, but as soon as I do the actual app._exec(), the code crashes with terminate called after throwing an instance of 'boost::python::error_already_set'. Is there any way to get the actual error message? (or to resolve this problem)
gaParent = gameArea.parent().layo...
I'm trying to keep some array data synchronized with the contents of a QTableWidget. I'd like to enable drag and drop reordering (moving items within the table, as opposed to copying), but it's not clear to me how, when the drop event is fired, I can find out what index the item was dragged FROM. Hence, I have no way of knowing what ob...
Hello everyone,
I get the following error when building a project in Qt Creator:
**error: collect2: ld returned 1 exit status**
Below is the compile output
**Running build steps for project mw_fe...**
Starting: F:/Qt/2009.04/qt/bin/qmake.exe C:/Documents and Settings/Administrator/My Documents/mw_fe/mw_fe.pro -spec win32-g++ -r CON...
i would like to read a line of data from text file and display that data in Text Edit box
...
I've a project with following files
TestProject/api/apiheader1.h
TestProject/api/apiheader2.h
TestProject/src/apiimplementaton.cpp
TestProject/inc/apiimplementation.h
TestProject/TestProject.pro
When the project TestProject.pro is built headers apiheader1.h, apiheader2.h needs to be copied to /usr/include/TestLib/. Is it possible to d...
I have a QComboBox which changes its selection possibilities depending on certain conditions.
Because of special combinations, it might have only one selection left over, which has to be "confirmed" by the user, preferably by looking at all possible selections, seeing that there is only one, and then selecting this.
My problem: If a us...
Hello everyone,
I'm trying to enhance Qt's QPrintPreviewWidget by allowing it to display page numbers (in the footer somewhere). Unfortunately, I can't quite figure out how to go about it without hacking up Qt's source. I see a great spot for this additional code (in qpaintengine_preview.cpp, in newPage() method) but that means I'm goin...