qt

wx's idle and UI update events in PyQt

wx (and wxPython) has two events I miss in PyQt: EVT_IDLE that's being sent to a frame. It can be used to update the various widgets according to the application's state EVT_UPDATE_UI that's being sent to a widget when it has to be repainted and updated, so I can compute its state in the handler Now, PyQt doesn't seem to have these,...

how to connect a signal to a slot in a different thread?

Hello Qt uses signals and slots normally in a single thread, so calling a signal will call a slot in the same thread signal called. Is it any way to use a signal-slot mechanism to pass a message to qt thread ( so slot will be called later in specified thread's context )? ...

How to keep together few inseparable text blocks in QTextEdit at the end of current page (throw all on the next page)?

Hello, i have a QTextEdit document which size is different by every print. In the middle of the document i have few blocks of text which are inseparable in the eyes of the user and i have to protect my blocks from splitting on two pages in case the document gets equivalent size. Have you got any solution? ...

how to emit cross-thread signal in qt?

QT documentation states that signals and slots can be 'direct', 'queued' and 'auto'. It also stated that if object that owns slot 'lives' in a thread different from object that owns signal, emitting such signal will be like posting message - signal emit will return instantly and slot method will be called in target thread's event loop....

Why QWidget::paintEvent doesn't get called?

I have a simple hierarchy of widgets: GraphWidget -> MotionWidget -> NodeWidget. I am new to Qt, so I am not quite sure about how some insides work yet. Basically, GraphWidget creates a single MotionWidget M and sets M's parent to itself. M then goes away and creates a bunch of NodeWidgets. However, NodeWidgets never get painted nor does...

Does anybody know how to launch windows from a console app using QT?

I'm learning c++ and QT and would like to be able to launch windows from a console application. Is this even possible? ...

Auto-hide panel in QT or WxWidgets

I am looking to find a way to have a docked panel that would be similar to the panels within visual studio. Essentially a panel that can be set to auto hide or can be pinned open. Possibly this question was a bit vague. What I am looking for is essentially this product Please leave a comment if I am missing details as I would like thi...

/usr/bin/ld: cannot find -lfreetype qt

Hello, Compiling on Fedora 10. I am using qt for the first time. I started by creating a simple GUI application with all the default settings. When I tried to build the project I got the following error messages. However, when I did a search for -lfreetype I found it in the following directory. /usr/lib/libfreetype.so.6 /usr/lib/libfr...

which platform do I need to install for qt for apps running on windows and linux

I am new to qt. I am not sure what installation I should download and install. I would like to develop desktop applications that run on both windows and Linux x86. Would I have to download and install on windows to run my apps on windows. And also download another installation and install on my Ubuntu to run my apps on Linux? Or could...

Cannot connect to X server :0.0 with a QT application

Hello, Compiling on Fedora 10. I have just started my first qt GUI application. I used all the default settings. Its just a simple form. It builds OK without any errors. But when I try and run the application. I get the following message: Starting /home/rob/projects/qt/test1/test1/test1... No protocol specified test1: cannot connect ...

Does qt 4.5 have any skins?

Hello, I am developing for the first time using qt 4.5. I am developing a desktop app that will run on windows xp/vista. The client would like to have a skin that assemblies a softphone, or something similar. Does qt come with any skinning engine? Is it possible to create skins using qt? Many thanks, ...

qt add path for 3rd party header and libraries

Hello, I am using qt and developing a desktop app that will run under win xp/vista. I have a 3rd party library UserAgentLib (static, and shared). But I am not sure how to link in qt creator. I have opened the *.pro file and added my library and header path. The library is called UserAgentLib and the header file is called UserAgentLib...

QToolBar: is there a way to make toolbar unhidable?

In Qt, if I right-click on a toolbar the menu will be shown that allows me to hide the toolbar. I need to disable this functionality because I want the toolbar to be unhidable. Is there a way to do this? ...

Can you create a setup.exe in qt to install your app on a client computer

Hello, I have created a desktop app and now I need to install in on a client's computer. However, the client would like to have a wizard to install. Like they have in visual studio setup project allows you to add an installer. Does qt allow you to create an installer? I couldn't see anything in the documentation. Or do I need to use ...

c++: when to use pointers?

After reading some tutorials I came to the conclusion that one should always use pointers for objects. But I have also seen a few exceptions while reading some QT tutorials (http://zetcode.com/tutorials/qt4tutorial/painting/) where QPaint object is created on the stack. So now I am confused. When should I use pointers? ...

how to force Qt widget to maintain equal height and width?

Hi all, I'm using Ruby Qt bindings. I'm trying to make a square widget (checker board), but it doesn't seem to work. This is the code that I tried What is the proper way to making a widget that maintains it's aspect ratio? ...

C++/QT: drawing a caret

I'm learning QT. I just started to write a text editor from scratch by inheriting QAbstractScrollArea. I'm doing this just for practice. But now I'm faced with the problem of displaying a caret. What comes to my mind is painter.drawLine and QTimer. Can you give some advices on this. I would also be glad hear some strategies to implement ...

qt design issue

i'm trying to design interface like this one http://www.softpedia.com/screenshots/FlashFXP_2.png i'm using the QT design and programming with python well on the left it's a treeWidget but what is on the right side ? as everytime i change the cursor on the tree all widgets replace... thanks :p ...

Adding Qt to Xcode project?

I have a fairly complex Xcode project and I want to add Qt to it. I know that I can create a new project using qmake -spec macx-xcode project.pro but I don't want to have to hand configure my old project over the auto generated Qt project. Is there another option? [edited in a more general question below] It seems like it would be easi...

QSortFilterProxyModel.mapToSource crashes. No info why.

I have the following code: proxy_index = self.log_list.filter_proxy_model.createIndex(index, COL_REV) model_index = self.log_list.filter_proxy_model.mapToSource(proxy_index) revno = self.log_list.model.data(model_index,QtCore.Qt.DisplayRole) self.setEditText(revno.toString()) The code crashed on the second line. There is no exception ...