qt

Error 404 when trying to fetch the Google Buzz @consumption feed

I'm writing an Qt application and I go through authorization process and everything. I'm even able to fetch the @self feed, but for some reason I get error 404 when trying to do the same thing with @consumption: "Download of https://www.googleapis.com/buzz/v1/activities/v.kiril/@consumption failed: Error downloading https://www.googleap...

Check whether a string is a valid filename with Qt

Hi, Is there a way with Qt 4.6 to check if a given QString is a valid filename (or directory name) on the current operating system ? I want to check for the name to be valid, not for the file to exist. Examples: // Some valid names test under_score .dotted-name // Some specific names colon:name // valid under UNIX OSes, but not on Wi...

Obtaining the Button Clicked after a Clicked() is emitted in Qt (C++)

Hello everyone, I was wondering, once a clicked() is emitted by a button is there any way of finding out what button emitted it without overloading the click() function? (I have a bunch of buttons with almost the same function but different text, which is the defining element of each button). Thanks in advance! ...

[Qt/C++] Need help in optimizing a drawing code ...

Hello all ... I needed some help in trying to optimize this code portion ... Basically here's the thing .. I'm making this 'calligraphy pen' which gives the calligraphy effect by simply drawing a lot of adjacent slanted lines ... The problem is this: When I update the draw region using update() after every single draw of a slanted line, ...

Changing a Widget's name based on a string read in from an XML form in Qt.

I'm writing a code for a voting machine that will allow user to read in custom XML ballots and then vote on them, however in the current build I have in QtCreator, I don't see an easy way to edit buttons in my GUI directly. In the code snippet below, I assign an element to pull out the names and type of ballot being read in, but I need t...

Bug when drawing a QImage on a widget with PIL and PyQt

I'm trying to write a small graphic application, and I need to construct some image using PIL that I show in a widget. The image is correctly constructed (I can check with im.show()), I can convert it to a QImage, that I can save normally to disk (using QImage.save), but if I try to draw it directly on my QWidget, it only show a white sq...

What's wrong with this piece of code for saving contacts?

Hi, I am using the latest Nokia Qt SDK. I have tried to add the contacts, it's not getting added.. what is missing here? // Construct contact manager for default contact backend QContactManager* cm = new QContactManager("simulator"); // QContactManager* cm = new QContactManager("memory"); // i tried this, its also not working ...

Qt creator, insert custom menu at specified place into menu bar

Hi, I have created a menu bar and some menus with Qt creator. One of the menus had to be coded to use QActionGroup features. Now it is easy to add my custom menu to the menu bar with: printMenu = menuBar()->addMenu(tr("&Print")); but my menu will be in the last position of the menu bar. How do I add my menu at a specified place? (e.g....

Qt/PyQt dialog with togglable fullscreen mode - problem on Windows

I have a dialog created in PyQt. It's purpose and functionality don't matter. The init is: class MyDialog(QWidget, ui_module.Ui_Dialog): def __init__(self, parent=None): super(MyDialog, self).__init__(parent) self.setupUi(self) self.installEventFilter(self) self.setWindowFlags(Qt.Dialog | Qt....

How does Qt works (exactly)?

When you write an application using Qt, it can be run in different operating systems. And - correct me if I'm wrong - you don't need to have Qt already installed in all of the plataforms you execute your application. How exactly this approach works? Does Qt compiles to the desired platform, does it bundle some "dlls" (libs), how does it...

How to create a cross-plataform application, doing the interface modules (Mac/Qt/GTK+) in a totally independent manner? (Like Transmission)

I'm amazed at Transmission, a BT client. It has a Mac, a GTK+, a QT, a Web Client and a CLI interface to it. I tried reading some of it's source to understand how he creates all these interfaces, but no luck. Does the developer creates them using a single ide? Or does he create the interface logic in each specific environment (speciall...

OpenCv QT CvNamedWindow IplImage not working

I have problem with displaying Cam on QTLabel using openCV, Every thing is working fine . except one . I have to call function from open === cvNamedWindow() == in order for program to work properly . its displaying the webcam on the QLabel no problem but if i don't call the cvNamedWindow function then the program is just hanging its ju...

Useful Qt Plugins

I'm a tad new to qt and so far I really only added qwt; but I was wondering, what are some other useful qt plugins? And is there a list somewhere? Thanks in advance. ...

Resizing QT's QTextEdit to Match Text Height: maximumViewportSize()

I am trying to use a QTextEdit widget inside of a form containing several QT widgets. The form itself sits inside a QScrollArea that is the central widget for a window. My intent is that any necessary scrolling will take place in the main QScrollArea (rather than inside any widgets), and any widgets inside will automatically resize the...

How do I cast Qt's QVariant to boost::any?

How do I cast Qt's QVariant to boost::any? ...

qt - How to make a label as fixed

I am trying to make a chess game. So I am placing the board,coins as labels in a widget. Now I want to make the chess board as a non-movable label. Because if I clicks and moves the board, it's moving. How to constraint it. ...

waiting for a signal

Hi, I am working on an application which uploads the content of the file to server. To upload the file to server I am using ‘QNetworkAccessManager’ class. Since it works as asynchronous way, I changed it to work as synchronous way by using QEventLoop. Class FileTransfer { Public : QNetworkAccessManager mNetworkManager; Voi...

How can I compile libpoppler-qt with Nokia's Qt SDK

Morning ! I would like to compile libpoppler and libpoppler-qt4 (the Qt Api/bindings) with the Nokia's mac sdk available on the website. I've tried a lots of configure switch but it does not works. Any hint ? ...

Resetting Qt Style Sheet

I've managed to style my QLineEdit to something like this: void Utilities::setFormErrorStyle(QLineEdit *lineEdit) { lineEdit->setStyleSheet( "background-color: #FF8A8A;" "background-image: url(:/resources/warning.png);" "background-position: right center;" "background-repeat: no-repe...

How to edit multiline text in cell of QTableWidget?

How to edit cell manually like in Excel: Alt + Enter -> line break (true break, not simply line break symbol on the same line) Enter -> exit from edit mode? EDIT: Text in one cell in view mode: Line1 Line2 Same text in edit mode: Line1 Line2 Besides, I cannot write newline in cell, I can insert it only by copying. ...