qt

Embedding QT application in Eclipse/RCP framework

Hi, I'm trying to embed my working QT application in Eclipse RCP framework(might not sound wise but i need to do this). I'm using QT 4.5 (not yet explored what QTJambi is all about and has to offer) I convert my existing application as a dll and load it through eclipse application. Things dont work as they should as the QTApplication lo...

Convert from float to QByteArray

Is there a quick way to convert a float value to a byte wise (hex) representation in a QByteArray? Have done similar with memcpy() before using arrays, but this doesn't seem to work too well with QByteArray. For example: memcpy(&byteArrayData,&floatData,sizeof(float)); Can go the other way just fine using: float *value= (float *)by...

Include a different jar for x32 and x64 bit operating systems

Hello Is there a way in Java to determine if the software is run on an x32 or x64 operating system - and in function of that - include a different jar during runtime? I am using qtjambi and they wrap the QT c and c++ libraties in an xxx_x32.jar and xxx_x64.jar Thanks for your feedback Marc ...

QT video examples does not work

I have QT 2010.02.01, Windows 7 In Exampels directory there are two video player examples: /multimedia/videographicsitem , /multimedia/videowidget But both of them does not work. They can show pictures (.jpg), but they cant open any .avi file (when open avi file, they just do nothing..) ... (I have all codecs installed) Is there any id...

QT qmake lowercases my custom widget names

I'm using QT 4.6 on Linux and Windows, and on Linux, it insists on including my QScrollPane by qscrollpane.h App.pro: HEADERS += widgets/QScrollPane.h The section from mainform.ui <widget class="QScrollPane" name="ListView"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>500</width> <height>490</height>...

Why does this PNG file look so poorly when embedded as a resource in a Qt project?

Here is the PNG file and what it looks like in a QWebView when accessed via http://sstatic.net/so/img/logo.png: When accessed via HTTP: <img src="http://sstatic.net/so/img/logo.png" width='250' height='61' /> When accessed via a resource: <img src="qrc:/images/logo.png" width='250' height='61' /> As you can see, the only modific...

How about using SVG(Scalable Vector Graphics) on desktop applications?

I am working in Train Traffic Controller software project. My responsibility in this project is to develop the visual railroad GUI. By now I am using some svg graphics in that GUI. I prefer them because of their scalability talents. Is it good or bad idea to use svg in a desktop application? Any suggestions? ...

Qt QNetworkAccessManager does not emit signals

The function CheckSite() is called with an url like http://site.com, it initializes a QNetworkAccessManager object and connect() slots and signals. The manger->get() call seems work (it generates http traffic) but does not call the slot replyFinished() at the request end. What's wrong with this code? #include <QtCore> #include <QtNe...

IPC in qt browser plugins

Hi, I have a simple doubt. Does the ipc mechanism in qt work when we use it for developing browser plugins? The reason i ask this is that I can easily get the QLocalSocket and QLocalServer communication to work in a qt application, but when i write a similar piece of code in a browser plugin dll i see that the server does not accept a n...

Artifacts when trying to draw background grid without anti-aliasing in a QGraphicsScene

Hi folks, I'm trying to draw a background grid in the drawBackground() function of my QGraphicsScene subclass: void Scene::drawBackground(QPainter *painter, const QRectF &rect) { const int gridSize = 50; const int realLeft = static_cast<int>(std::floor(rect.left())); const int realRight = static_cast<int>(std::ceil(rect.ri...

How can use QTableWidget

How can I show data on QTableWidget and read from data on it with header? ...

How to Track Emitted Signals in QT?

Is there any way to observe all signals which are emitted? PS. Of course we can write slots for all signals, but that is not I want. Thanks. ...

how to get the Current TimeStamp in QT

Hi i try to get current time as timestamp without success here is my code that returnes me Sunday, January 25th 1970, 03:17:35 (GMT) QDateTime setTime = QDateTime::fromString (QString("1970-07-18T14:15:09"), Qt::ISODate); QDateTime current = QDateTime::currentDateTime(); uint msecs = setTime.time().msecsTo(current.time()); return QS...

how to add menu dynamically in Qt

Hi, I want to add, submenu to a menu item dynamically. How can I achive this? I tried like this, I have created an Action and submenu. Then I have added the submenu to action. But, I have connected the “triggered” signal of action. its getting crash if I click on the action.. I have also handled the “aboutToShow” signal of menu, sam...

QSqlQuery UPDATE/INSERT DateTime with server's time (eg CURRENT_TIMESTAMP)

I am using QSqlQuery to insert data into a MySQL database. Currently all I care about is getting this to work with MySQL, but ideally I'd like to keep this as platform-independent as possible. What I'm after, in the context of MySQL, is to end up with code that effectively executes something like the following query: UPDATE table SET ...

Use Google Test from Qt in Windows

I have a simple test file, TestMe.cpp: #include <gtest/gtest.h> TEST(MyTest, SomeTest) { EXPECT_EQ(1, 1); } int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } I have Google Test built as a static library. (I can provide the makefile if it's relevant.) I can compile TestMe.cpp f...

QT Creator simple application

I'm developping a very simple app on my Ubuntu using QtCreator. It's a console application and I want the user to enter its name, and then I display his name. Here is the code : #include <iostream> int main(int ArgC, char* ArgV[]) { char Name[1000]; std::cout << "Type your name : "; std::cin >> Name; std::cout << "He...

How to interact with checkbox actions ? (QTableView with QStandardItemModel)

I'm using QTableView and QStandardItemModel to show some data. For each row, there is a column which has a check Box, this check box is inserted by setItem, the code is as follows: int rowNum; QStandardItemModel *tableModel; QStandardItem* __tmpItem = new QStandardItem(); __tmpItem->setCheckable(true); __tmpItem->setCheckState(Qt::U...

Any really modern, good-looking desktop apps that are developed with PyQt/PySide?

Hi, I have started using Python for web development recently, it's kinda cool; I have seen programs that are developed in QT/C++, which is good enough in terms of esthetics; I have just noticed the new PySide project (which brings LGPL Qt license to Python and it doesn't support Windows yet). In view of the above, I see the possibility...

Basic compile issue with QT4

I've been trying to get a dead simple listing from a university textbook to compile with the newest QT SDK for Windows I downloaded last night. After struggling through the regular nonsense (no make.bat, need to manually add environment variables and so on) I am finally at the point where I can build. But only one of the two libraries se...