qt

Interfacing GPIB with Qt

Hi, I was wondering if it is possible to interface with GPIB Instruments by using C++ and Qt. If it is possible, can anyone tell me how easy it would be and/or point me in a direction for a tutorial or examples? Thanks a lot. ...

Using layout of QMenuBar

Hello, Is it possible to get layout from QMenuBar object and add items to it. What I am trying to do is a menu bar containing custom widgets (a clock and login/off widget) on the right. This code crashes. QPushButton *b1 = new QPushButton("Button",ui->menuBar); QHBoxLayout *rlayout = new QHBoxLayout(this); ui->menuBar->layout()->addIte...

Setting up QtJambi connections from JRuby

I've been setting up a Qt gui using QtJambi and JRuby. So far things have gone well. I'm ready to start setting up connections, however, many of the signals don't seem to be visible from jruby. For example, if I print out the methods of QPushButton, I don't see any method called "clicked" for me to build a connection from. I found ...

Qt: How to detect the right clicked item when using customContextMenuRequested signal

hello all quick question im using in Treewidget the customContextMenuRequested signal and using using popup with qmenu How can I get the item pointer / object / reference that just bean right clicked before the popup executed I need to make some validation on the item ...

how to add zlib to an existing qt installation

How can I add zlib to an existing installation of Qt. I m pretty new in this so please give me detailed description! Thanks for your help in advance! ...

Pyqt save dom to file

Why this code does not work ? I want save dom after js execute at this page and i want use qt without gui. Sorry for my English. #coding:utf-8 from PyQt4 import QtCore, QtWebKit class Sp(): def save(self): print "call" data = self.webView.page().currentFrame().documentElement().toInnerXml() open("htm","w")....

What is the best way to represent tree structure in memory as a cache?

Hello all I have tree with nodes. The nodes are constructed by TCP API request response value. To make less requests I'd like to represent the tree in a cache structure, that each time when TCP request are about to be invoked it will check the cache first. What is the best way to do it? I mean the tree cache part, in my case I'm using Qt...

creating MAC like QSlider

Hi, I want to make the default QSlider like that of Macintosh. Is it possible. I tried with the setStyleSheet, but failed to make that one. Any suggestions... Please? Thanks ...

problem of adding a QPushButton using setItemWidget inside QListWidgetItem

Hi, I want to add a QPushButton inside ListItm, so I have implemented the code as given below. But the button comes in the middle of the list, actually I want it at the lower end of the list item. How is it possible. Also that button click event is not working. Actually I want to disable the item click event directly and by clicking the ...

QT: How to open several windows (QWidgets) at once?

Hello! I'm doing web interface testing program which should open two urls in two webkit windows simultaneously. I already did the code for the test automation. 1) User pushes 'Go' button and webkit (QWidget) window opens 2) TestBot class object performs tests 3) Closes Now my question: After clicking on the button 'Go', how do I op...

Qt C++ tcp client with python twisted server

Hello, I'm trying to connect a very basic twisted "hello world" server with a basic Qt tcp client. The client uses these Signals: connect(&socket, SIGNAL(connected()), this, SLOT(startTransfer())); connect(&socket, SIGNAL(readyRead()), this, SLOT(readServer())); and then readServer() looks like this: ui->resultLabel->setText("Readin...

submit data to webform

How I can submit string to webform, if I using QWebKit, c++? <div style="text-align:center;"> <form id="postform" method="post" action="javascript://" onsubmit="chat.add();"> <div> <script type="text/javascript"> <input type="button" onclick="chat.add();" class="chat_button" value="Send!" /> ...

Is it possible to embed html with js into QwebKit

will I need to load java script objects into QwebKit when my application is loading I can use setHtml with the html and the java script string formatted but its very hard to Maintain. My question is can I embed the html and java script as resource into Qwebkit ? Also I don’t what that the html and the javascript be available to the appli...

Qt Getting Response from SoapRequest

Consider the following in Qt using QtSoap lib: QtSoapHttpTransport http; http.setHost("XXXX",3333); connect(&http, SIGNAL(responseReady()), this, SLOT(getResponse())); now there is a method i want to call which is: QtSoapMessage request; request.setMethod("test"); request.addMethodArgument("xxx","zzzz",xxx); request.addMethodArgum...

Qt build warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -L not found

I'm trying to get a Qt app compiling for Mac running Snow Leopard, using Qt Creator 2.0.1 and Qt 4.7.0 (64 bit). The app compiles on other platforms, but on my Mac I get this warning :: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -L not found This is a new install of Qt Creat...

Resizing a QGraphicsItem to take up all space in a QGraphicsView, problems when window is resized

Hi, I have a QGraphicsItem (actually, a QDeclarativeItem) and I want it to take up the entire visible space of the QGraphicsView (again, its actually the derived QDeclarativeView class) to which it was added. Normally, you can use QDeclarativeView::setResizeMode(QDeclarativeView::SizeRootObjectToView) and QDeclarativeView will automatic...

QMainWindow problem on Mac OS X

I have a Qt-based program, and I uses QMainWindow somewhere in the UI part. This program works fine on both Windows (windows 7) and linux (Ubuntu 10.04), however, when I try to run it on MAC, some UI problem occurs. The Central widget of QMainWindow shows up correctly, but the frame (where the "minimize", "maximize", "close" buttons sh...

Qt Tray Icon Drag and Drop

Does anyone know if it is possible to use drag and drop with a tray icon using Qt? ...

Qtestlib log window

I link my program against the qtestlib and include QTest. But then I get a log-window which prompts all the qDebugs, when the application starts even if I set the configuration to release or debug. Is it possible to include QTest without opening a log-window on application start? I need some functionality of QTest in my program. Note t...

Simulating a directory tree platform-independently

I am using Qt and Ruby in an application where I have to manipulate some directories and rename/move files. However, prior to the actual manipulation I need to show a "preview", ie, simulation of the changes. What I've done on OS X and Linux is a collection of mkdir and touch commands, in a writable tmp space, to build my said "directory...