One executable that starts as a GUI application or console application based on command line in Visual Studio 2005

I have a Qt application in Visual Studio 2005 which is linked using \subsystem:windows such that when I run the compiled executable it does not create a command line terminal, as well. I would...

Which is better? Qt Creator or Visual Studio IDE

I am currently using Qt Creator 1.3 for my Qt applications. I know it uses jom for make step which is better when we have multi-core processors. But besides that what are all the advantages of...

How to redirect qDebug, qWarning, qCritical etc output?

I'm using a lot of qDebug() << statements for debug output. Is there any cross-platform way I can redirect that debug output to a file, without resorting to shell scripts? I'm guessing that open()...

how to divide QGridLayout into rows and columns at Design Time in QT?

how to divide QGridLayout into rows and columns at Design Time in QT ? I want to design one form where i want to have 2 columns and 7 rows . I am designing using QTCreator but i am not getting any...

How to get the width of a window frame, before creating any windows?

EDIT: this app will run on Windows, Mac, and various Linux distros. I'm aware Linux has issues with this, but what about Windows? Mac? Is there any way to get the width of the frame for a normal...

Paint/Draw on top of docked widgets in QDodckWidget

I have a class in Qt that inherits QDockWidget. And that class contains another widget. Is there any possibility to define a function in my QDockWidget inherited class that draws stuff on top of...

Force point and not comma for floating point in Qt

I have a very basic question: how can I enforce the use of points in floating-point numbers instead of a comma (I have a french version of my OS) in Qt? Other question :is it possible to display...

How to make a QPushButton pressable for enter key?

I want to make my app laptop friendly. I can tab to everywhere, but if I tab to a QPushButton I can't press it with Enter, only with space. What's the problem? How to make it pressable for Enter?

How do I style a Qt Widget not its children with stylesheets?

I have a: class Box : public QWidget and it has this->setLayout(new QGridLayout(this)); I tried doing: this->setStyleSheet( "border-radius: 5px; " "border: 1px solid...

How to get list of visible QModelIndex in QAbstractItemView

Is there any way to get a list of currently visible items in QAbstractItemView? And, if it possible, to receive any notifications about changing of this list. Upd: I'm asking exactly about...

Qt: Convert QString to Hexadecimal

I know this is a very basic question but I'm newbie in Qt and I don't know to do it. I'm trying to convert a QString value (like "AA110011") to hexadecimal. I would like to obtain 0xaa110011. I've...

Starting QProcess and reading its output one line at a time

What would be the preferred way in Qt of reading a child process output one line at a time as it appears? I tried connecting QProcess signal readyReadStandardOutput to the function that calls...

Qt quick controls ScrollView

I didn't found any good resource how to use this component and it still fails layout of my app (check that right properties inspector). What i did wrong? without ScrollView with...

How can I round the corners of button in Qt using a stylesheet?

I have buttons in my app (Qt, Visual) and I have tried to change their style: color, shape etc. I used sth like this: button->setStyleSheet(QString::fromUtf8("QPushButton{background-color:...

QWebView vs QWebPage

The documentation (in PyQt at least) for QWebView says: 'The QWebView class provides a widget that is used to view and edit web documents', whereas QWebPage says: 'The QWebPage class provides an...

How to build a QT-project in visual studio from command line

I am trying to automate the build process for one of my QT-project. I used the following command in my batch file for non-QT projects "C:\Program Files (x86)\Microsoft Visual Studio...

Draw an arc/circle sector in QML?

I know that it is possible to draw a circle in QML using the following code: Rectangle { width: 150 height: 150 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top ...

Where is Qt designer app on Mac + Anaconda?

I am trying to find Qt designer app on Mac. I installed anaconda package and conda reports that qt, sip, and pyqt are installed. Still I couldn't find the designer app in any of the folders. My...

cpp:-1: error: C1041: cannot open program database; untitled-build-desktop-debug\vc120.pdb'

All the answers available for this problem are solutions for Visual studio. I am facing this problem in QT. I run a sample example but this error pops up.Could somebody help. error: C1041: cannot...

QWebView: Get size of the content

does anybody know how to retrieve the Size of the content within a QWebView? I've tried QWebView v; ... v.page()->mainFrame()->contentsSize(); but this always returns 640x480, independend of the...

How to set QNetworkReply timeout without external timer?

Is it possible to set a timeout for QNetworkReply, so for a long time there is no reply from server, it could emit the finished() signal?

How to install a missing Qt module?

How can I install/add a missing Qt Module under Mac OS? I have Qt Creator installed and working, but a new project gives the following error: Project ERROR: Unknown module(s) in QT: charts Can I...

How to hide the status bar Qt

I'm trying to create an opening screen for my software. Because I have a status bar in the QMainwindow then Qt makes me a transparent line line at the bottom of the opening screen. I tried...

QJsonDocument::toJson() incorrect double precision

In my project I read from a json file with QJsonDocument::fromJson(). This works great, however when I try to write the QJsonDocument back to file with toJson() some of the doubles have messed up...

Reading from a UNIX domain socket (QLocalSocket) on Qt

I am having trouble reading from a UNIX domain socket, server application is Python-based, and I need to implement IPC to communicate to Qt application as client. Server application is tested and...

libudev development package not found

I am writing an app autodetect devices is plugged/unplugged. I used C++ with the Qt framework. *libudev.h* was included on my code. and I actually installed libudev-dev package successful via sudo...

How to update ListElement (QML) value field with dynamically updating property

In the below code, the property __operatingModus_season updating every 30 seconds. But in frontend, I dont see any value or changes. Please give some heads up if i am wrong. ListModel{ id:...

This application failed to start because no Qt platform plugin could be initialized

I am new to programming and I am stuck trying to run a very simple Python script, getting this error: qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in "" This application failed to...

How to add text onto QToolbar with Qt Designer?

I would like to ask, if it is possible to add some text onto QToolBar with Qt Designer?

QtCharts module not found even after installing in Qt Maintenance

I know that there're many questions regarding this...