Is there a way to change the alignment of the icon or text of a tab in Qt? Specifically, I would like the text to appear below the icon. By default the icon sits to the left of the text, but that's not appropriate for all situations (especially when you start styling your tabs with stylesheets) It would seem very odd to me that this aspe...
Dears,
I have a windows screensaver that I want to recompile using the QT libraries, so that I can make available for more platforms.
I am facing problems with the deployment on Vista and XP.
I compile my screensaver statically with MT, and run the dependency checker.
The results are:
MyScreensaver.SCR needs several DLLS, QTCORE4.DLL ...
I'm building a Qt client for the open-source client/server 4X strategy game Thousand Parsec. This a Google Summer of Code project. I'm however stuck at a dead end. Basically, the client interfaces with the server via a C++ protocol layer that facilitates client/server communication. The protocol's documentation is available here.
Now my...
Hi,
i am using Qprocess to execute ping to check for a host to be online or not...
The problem is that the exit code that i recieve from the Qprocess->finished signal is always 2 no matter if i ping a reachable host or an unreachable one..
I am continuously pinging in a QTimer to a host(whose one folder i have mounted at client where ...
In Linux after text selecting it copies to buffer, so than we could paste it by clicking middle button of the mouse. I think that there is a special buffer for this thing. I want to use it. How could i get data of selected text?
OS: Linux
Programming language: c++
Own libraries: Qt
Thanks.
...
Hello, i'm trying to set global shortcut for my applcation using QxtGlobalShortcut.
Here is my code:
QxtGlobalShortcut m_hotkeyHandle;
m_hotkeyHandle.setShortcut( QKeySequence("Ctrl+Shift+X") );
m_hotkeyHandle.setEnabled(true);
connect( &m_hotkeyHandle, SIGNAL(activated()),
this, SLOT(hotkeyPressed()) );
void MainWindow::hotk...
Hello, i have a QMainWindow. It has this parameters:
this->setWindowFlags(Qt::Tool);
this->setFocusPolicy(Qt::StrongFocus);
this->setAttribute(Qt::WA_QuitOnClose,true);
After showEvent calles my window is shown but unactivated.
I tried to overload show function:
...
QMainWindow::showEvent(event);
this->activateWindow();
...
B...
Hello, i'm trying to get web-page data in string that than i could parse it. I didn't found any methods in qwebview, qurl and another. Could you help me? Linux, C++, Qt.
EDIT:
Thanks for help. Code is working, but some pages after downloading have broken charset.
I tried something like this to repair it:
QNetworkRequest *request = new...
I'm trying to copy the Qt systray example here:
http://doc.trolltech.com/4.3/desktop-systray.html
Things seem to be working except that the QSystemTrayIcon object is not sending an activate signal.
Here's my mainwindow.cpp code:
#include <QtGui>
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *paren...
I am trying to communicate with TCP between a Qt program and a regular linux program. I have an existing linux client server program and I am trying to replace the server program with a Qt application. Here is the linux client code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>...
I've got two forms, the mainform which opens up a dialog box that has a text box in it. How can I pass the text from the textbox back to the mainform? I've tried alot of different methods but I think I'm missing something simple. Thanks for any help.
...
I'm working on a project that is using the Qt/MFC Migration Framework and I'm trying to reuse some existing MFC controls inside of a Qt dialog.
Does anyone know if it is possible to insert an MFC control (CDialog or CWnd) inside of a QTabWidget. Right now we're doing the opposite, we have an MFC dialog with a tab control which is popula...
I'm developing an application using Qt 4.5 (under Windows Vista but want it to be cross platform). I'm using C++
I'd like to create a popup window that that contains a QLineEdit widget, with the feature that when the user interacts with the QLineEdit widget, the popup window is not activated (the main application window remains active)....
This might be a little QT specific, but here we go...
I've got a QT app that I need to interface with a couple of external libraries written in C. Everything seems to be working, as I can link correctly, but when I try and call any function in one of the libraries I always get an access violation error. For the other library, I call l...
Hello,
I have a treewidget in my Qt form. It shows a tree of files, showing a icon representing something about them, and their name.
I entered these using treeItem->setIcon(0, *icon), and treeItem->setText(0, text) .
The reason I entered both values to the same column (0), is because otherwise the icons would not stay next to the tex...
Hello
I am trying to create a QTreeView which displays some sorted information. To do this I use a QSortFilterProxyModel between the view and my model.
The problem is that I want to limit the number of rows to the first n rows (after sorting). The filter function from the model receives the original sourceRow so I cannot use it.
I've ...
Like I said in a previous question, I'm planning on porting a Qt project from VC++ to QtCreator.
The project consists of 4 subprojects: 3 of them are libs and the last one makes the exe.
The subprojects are layered, meaning that each layer has compile and link time dependencies to the layers beneath it.
The files are organized as follo...
I am attempting to reduce the amount of signals I have to use in my contextmenus. The menu consists of actions which switches the operation mode of the program, so the operation carried out by the slots is very simple. Quoting the documentation on QMenu::triggered,
Normally, you connect each menu action's triggered() signal to its ow...
I am using a QWinWidget inside of an MFC dialog and the QWinWidget is not drawing itself correctly and it is not handling keyboard input correctly.
Repainting [Unsolved]
Within the QWinWidget, I have a QTableWidget. When I scroll the QTableWidget, it does not redraw itself until I stop scrolling, at which point it redraws everything. S...
Hi all,
I have a thread to monitor serial port using select system call, the run function of the thread is as follows:
void <ProtocolClass>::run()
{
int fd = mPort->GetFileDescriptor();
fd_set readfs;
int maxfd=fd+1;
int res;
struct timeval Timeout;
Timeout.tv_usec=0;
Timeout.tv_sec=3;
//BYTE ack_mess...