qt

How can I find a Qt metaobject instance from a class name?

Is there a way to find the QMetaObject instance of a class, given the class name? what I like to do is to load objects from disk, but for this to happen, I need a way to retrieve a QMetaObject instance using the name of a class, in order to use the QMetaObject to create an instance. ...

ChaiScript troubles

Hello guys, I'm using script language ChaiScript with c++ and Qt. I've defined such function: void ChaiPainter::drawRectangle(QPainter *painter, int x, int y, int height, int width) { painter.drawRect(x, y, width, height); } And in application paint-event: void MainWindow::paintEvent(QPaintEvent *event) { QPainter painter(thi...

shared library path inconsistent from one host to another

I built my qt app so that all the Qt modules it uses are contained in the same directory as the executable. It works on the machine I used to build the app and I made sure to test this by removing those shared libraries everywhere except in the current directory of the app. Doing a ldd shows that its looking for those libraries in the c...

How to delete a widget from a stacked widget in Qt

Hi, I am using QStackedWidget to switch between the views, I will be able to traverse between the views, I am facing problem in some scenario, where I do not require the widgets, I want to remove them completely.. QStackedWidget provides the functionality to remove widgets, still the ownership of the widget will be there, I mean widget ...

have you got a py-poppler-qt example?

Hello everybody, I'm developing an application in PyQt4 that eventually has to open and show PDF files. For this task there is a python library: python-poppler (in various spelling flavours). The problem is that it is terribly under documented and the only simple working example I found so far uses Python+Gtk+Cairo, while the example ...

Notification to the end users about a newer version

Hi, I am having an application that will be installed on various machines. Now if i have a newer version than the installed one, i need to inform the users that an update is available. An update that shows up in Mozilla Firefox about a newer version,similar to that. Is this possible to implement?? Or how those Firefox guys implementing t...

Hiding an entry from a QMenuBar in Qt4?

I can find no non-deprecated way of hiding an item in a menu bar in Qt4. This post: http://qt.nokia.com/developer/faqs/585 gives a method that uses deprecated Qt3 compatibility functions. Is there a better way? ...

Ruby bindings for Qt gui application.

How to create a Qt GUI applications with the ability to access it from the ruby script. Example: require 'myQt' myapp=myQt.new myapp.startQtGuiApp myapp.setValue('TextField1',45) value=myapp.getValue('TextField2') ...

Mupltiple Qt project files in one Eclipse project

Is it possible to have multiple Qt project files in a single Eclipse project? The reason that I want to do this, is that I want to generate two different executables that have a large code base in common. If there is a better way to deal with this, please let me know. ...

Qt QComboBox popup position

Hi, I'm working on an application which contains an editable QComboBox. I observe the following behavior when I enter some text in the edit field and press the dropdown arrow in the combobox: My edit line ends up hidden behind the item "[email protected]". I would like to have the combobox list popup below the edit field, like in the below sc...

Latitude/Longitude Qt4 widget?

What is the best starting point for a Qt4 widget for entering Latitude/Longitude in DD:MM:SS format (degrees, minutes, seconds)? Customize a QLineEdit? A series of spin boxes? ...

Changing the color of a QTextBlock that is within a QTextDocument

Is there any other way to change the QTextLayout of a QTextBlock that is within a QTextDocument without having to subclass QAbstractTextDocumentLayout and call its documentChanged? I know that on a call to QTextBlock::layout() const ; "the returned QTextLayout object can only be modified from the documentChanged implementation of a QAb...

How to change the background of a text bloc in a text document in Qt

is there a way to change the background color of a QTextBlock in a QTextDocument without using a subclass of QAbstractTextDocumentLayout. I have tried many ways and the effects are null. I am trying from the textCursor() method of a QPlainTextEditor and it seems practically everything is const. ...

My listview is not gaining the keyboard focus in Qt

Hi, i am trying to operate the listview itesm through keyboard focus, its not moving.. can you folks suggest where i am wrong. if i click on the listview from mouse, listview is gaining the focus. i dont no what is wrong. class Newlist : public QWidget { public: Newlist(QWidget *parent = 0); ~Newlist(){}; public: QListVi...

Date check for counting 30 days

Hi, I want to count the days passed with respect to a given date. I have a predefined date with me and i want to check the days passed, once the day pass 30 days with respect to the given time i want to get a message. example given date is25/03/2010 and when my system date reaches 25/04/2010 i have to get a message. How can i implement...

Datatype to use for collection of QT buttons

Hi Everyone, I am brand new to QT and need to develop the Mancala game. Since I'm brand new to the QT environment, my plan it to keep things very simple. I will be using the "Push Button" widget as pieces on the game. Since two players play this game, my idea is to have to arrays of buttons. One array for player 1 and the other for ...

QTreeWidget insertTopLevelItem - index given not accurately displayed in Tree?

I am unable to properly insert a QTreeWidgetItem at a specific index, in this case I am removing all QTreeWidgetItems from the tree, doing a custom sort on their Date Objects and then inserting them back into the QTreeWidget. However, upon inserting (even one at a time) the QTreeWidgetItem is not inserted into the correct place. The ...

Qwt setAxisScale() seems to lock up application when given numbers with greater precision than 2e-07

I'm using Qwt for some scientific graphing, and I'm working with some fairly small numbers, the smallest being around 1.0e-22. I'm trying to call setAxisScale(xaxis, xmin, xmax) //xmin = 0, xmax = 2.0e-10 But when I do, the application locks up. I haven't found anything in the documentation that refers to a minimum value. Xmin and...

how to implement help action in qt

I want to know how to implement help menu actions in Qt. When I click the HELP action, the RTF file should come up in a window or view. ...

PyQt error: No such signal QObject::dataChanged

PyQt application works fine, but when I close it Python shows this message: "Object::connect: No such signal QObject::dataChanged(QModelIndex,QModelIndex)" What is the cause of this? There isn't dataChanged signal in the program. EDIT: Almost minimal program which causes error: import sys from PyQt4.QtCore import * from PyQt4.QtGui imp...