qt

Qt application crashing immediately without debugging info. How do I track down the problem?

I run an Qt app I've built: ./App Segmentation fault I run it with strace: strace ./App execve("./App", ["./App"], [/* 27 vars */]) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Process 868 detached Again, no useful info. I run it with gdb: (gdb) run Starting program: /root/test/App Reading symbols fr...

How can I use the Clojure REPL together with Qt Jambi?

I have not found a solution to use the Clojure REPL with Qt on the web. Basically the problem is that the REPL hangs as soon as you call QApplication/exec in order to get the UI to display. You cannot C-c C-c back into the REPL, and closing the active Qt window seems to kill the whole Clojure process. Now simply calling QApplication/pro...

Using Qt to make an almost native Windows Application?

I love that Qt is cross-platform but I want to make an application that will call into some Windows specific .dll's. Kinda like Google Chrome does with the glass on Windows Vista/7 (I know Chrome isn't written using the Qt framework just thought it was a good example). How can I do this in Qt? Is it feasible? ...

Compiling a shared library with Qt on Ubuntu 9.10

I am new to both Qt and Linux C++ development (although I have many years C and C++ development experience on Windows). I have some legacy C projects (source files and headers - [not using Qt]) that I want to compile into shared libs on Linux. I am proposing to store my projects under the following structure: /home/username/Projects/p...

Hiding a QWidget on a QToolbar?

Hi, I have directly added some QWidgets to a QToolbar but simply going widget->setVisible(false) did not work. Can someone please give me an example of how to show and hide a widget that is on a QToolbar? Thanks! ...

How to get OS information whether it be LINUX or WINDOWS?

I'm running "QUdpSocket::ShareAddress" on my QT application but ShareAddress is ignored by windows. So I'm trying to solve this problem by identifying OS at run time. I heard a couple of information about window version indentifier but I couldn't see any solution to solve my problem. If there is any of advice, it would be very appreciat...

transition from MFC to QT

Hi Currently our all GUI component are written in MFC, Out build environment is : VC 6 Windows XP I have no idea about : 1) If we can replace all MFC components with QT, without changing build environment ? 2) Will Qt work with VC6 as any other library ? You answers will help me in getting started, In mean time i have i...

Qt equivalent of .NET data binding?

Is there an equivalent of .NET's data binding in Qt? I want to populate some combo boxes and other widgets with QStrings that refer to specific entities in my database. However, it would be cleaner if I could bind the data to these strings rather than either querying the database again based off of a new combobox selection or some other...

OpenGL / C++ / Qt - Advice needed

I am writing a program in OpenGL and I need some sort of interfacing toolbar. My initial reactions were to use a GUI, then further investigation into C++ I realized that GUI's are dependent on the OS you are using (I am on Windows). Therefore, I decided to use QT to help me. My Question is if I am taking the best/appropriate approach to...

Why can I not insert a QStackedWidget inside a custom widget?

I have made a custom Widget based on the "Custom Widget Plugin Example". Inside that custom widget I put a QStackedWidget. The problem is that when I start coding I cannot access the stackedWidget. Why? ...

Custom system tray icon "balloon tooltips" for Qt?

I know that in the .NET framework there are a handful of alternative third-party controls for normal system tray icon "balloon tips", that allow you to change the colors and add some styling to the balloon. I was wondering if there is something similar for Qt, which allows for better customization of the look, style, and feel of the bal...

Showing two windows in QT4

A friend of mine and myself are working on this application for QT4. Each of us has created parts of the gui that work. I am trying to integrate his work into the main window of the gui (his work is another form that should load up). As of now this is the code I am using to try and load his second window: //connect buttons and such c...

how do i place QTableWidgetItem Icon in center of cell

i want a table cell to have just an icon without any text. i see the QTableWidgetItem class has a method to align the text (int QTableWidgetItem::textAlignment () const) i find no way to adjust the placement of the icon (which seems to get stuck on the left -- even where there is no text in the cell) look at the Status and Energy colu...

PyQt: translating standard buttons

How can I easily translate standard buttons (Yes, No) from QMessageBox? I can't use self.tr on those arguments, so I would like to achieve it in some other simple way. Do I have to use whole translation system? ...

Using QFrame to display different panes of information?

I'm trying to get a QFrame to serve as a "display area" for a couple different kinds of information, eg: you click on something in a list view and an info pane shows up in the frame to give you information about it, you click on a different item and a different pane shows up. Having trouble swapping the different frames in and out of t...

How do I determine if the item is selected or not in the paint() function of QItemDelegate?

I am making a table using QItemDelegate. I use the paint(..) method to draw delegated items to look the same when they go out of edit mode but I also need to draw the items differently when they are selected or not and the paint method is also called during those events. My question is how do I know when to draw which? thank you. ...

QT exited with code 0 on release

Hello, Does anyone have stucked on strange problem with QT Creator. When I try to build my simple console app in it with release in output window i see only: Starting C:\Users\xxxxx\Documents\Composite\Compositing\debug\Compositing.exe... C:\Users\xxxx\Documents\Composite\Compositing\debug\Compositing.exe exited with code 0...

Why this program fails (sometimes)?

#include <cstdio> #include <QtCore/QProcess> int main (int argc, char** argv) { // if we remove 3 following lines, the problem described below doesn't exists!! QProcess process; process.start ("asdqwe"); // doesn't matter what we try to execute here. process.waitForStarted (1000); while (true) { char buf[100]; if (sca...

Styling QPushButton with CSS?

I'm trying to create a QPushButton that's just got an icon and a constant background color. So that I can swap out the icon when the user clicks it, without any other apparent effects (this is for a roll-up/roll-down feature). I've added an entry like this to my stylesheet: QPushButton.ToggleButton { background-color: #8af; } and...

QtScript -- script-side callback through C++-side implementation

The solution may be simple. Then again it may not be possible. I have the base callback class: class CFCallback { int command_; int transfer_rate_; public: CFCallback(int command, int transfer_rate = 0) { command_ = command; transfer_rate_ = transfer_rate; } virtual ~CFCallback() {} virtual void operator...