Hi guys,
I'm using Qt 4.6 and I'd like to react to multi-key combos (e.g. Key_Q+Key_W) that are being held down. So when you hold down a key combo, the event should be called all the time, just the same way as it works with single key events. I tried to use QShortcuts and enable autorepeat for them, but that didn't work:
keyCombos_.pus...
I use QTableView + QStandardItemModel to show some data (data stored in some other data structure), and this table view is sortable.
Since it is sortable, when sorting this model, I also need to sort the order of stored data. I try to implement a slot for the sorting signal, but I don't know what signal is emitted when clicking the head...
Hey guys,
I'm having a problem with adding the Qxt library to Qt Designer. The error it gives is:
Cannot load library C:/Qt/4.6.2/plugins/designer/QxtDesignerPlugins.dll; The specified module cannot be found.
Any ideas on what the problem is?
...
Hello,
I am creating a drawing application where the user can insert primitive shapes, like circles, triangles, etc. In the toolbar, I would like to have a single "Add Shape" button that shows a dropdown widget when pressed. In the dropdown, I would like to have a grid of QAction icons representing the different shapes the user can ad...
I use libssh2 to login a remote computer, then call libssh2_channel_exec to execute a daemon program, the daemon program will then select a available tcpip port and print the selected prot to console(stdio). Then, the daemon will listen the port for the incomming connect.
After these step, the client will read the selected tcp port from...
hello, i got this code in qt creator;
int main( int argc, char* argv[] )
{
QApplication oApp( argc, argv );
QAction *action1;
QMenu menu;
QSystemTrayIcon TrayIcon( QIcon("favicon.ico") );
TrayIcon.show();
action1= new QAction("action1", NULL);
action1->setStatusTip("Create a new file");
menu.addAction(bf2142);
TrayIcon.setC...
i got an action in my menu;
connect(action, SIGNAL(triggered()), this, SLOT(action1()));
but when i executed the function my program always exited. how to solve this?
...
I am trying to create a chessboard. All the coins are transparent and the board is not. When I tried to get the clicked item using the function 'itemAt' it always returning the backGround item(that means the board). I am suspecting that due to the fact that the coins are transparent, they are not selected.
...
I remember reading somewhere that Qt guarantees the size of some data types on supported platforms. Is it that int will be at least 32 bits everywhere, and qint32 will be exactly 32 bits everywhere? Or something else?
C++ guarantees that int will be at least 16 bits, and some Qt structures like QRect and QPoint use int internally. I'm d...
Recently I was listening to a tech talk on clean coding. The speaker was a test engineer, who emphasized on avoiding the "if" statements in the code and use polymorphism as much as possible. Also he advocated against global states.
I quite agree with him, yet i need a clarification on replacing the global state and "if" statement using ...
Are you aware of any lexical analyzer or lexer in Qt? I need it for parsing text files.
...
Qt's QList class provides several methods for getting the number of items in the list - count, length, and size. As we all know, consistency is important, so which should be the canonical/preferred method to use of those 3?
...
I have a QMainWindow, and want to handle the "clicked" signal from a smaller widget (such as tableview) inside it.
Originally I connect the signal to a slot of this QMainWindow, this is the most common approach.
Now I need to tell which mouse button is clicked, and do different things for left and right button, I found that the "clicke...
I want to design a text editor in QT and planning to implement the following basic features,
1) Basic editing features like cut,paste,formatting,indentation etc.
2) Auto completion based on the context.(Based on some xml input file)
3) Syntax highlighting ( based on some xml input file )
Can you please suggest some approaches for the...
For each OS there is a location for storing temporary data. It could be like: C:/Users/[user name]/AppData/Temp (or so). How can I get this path independently from OS with QT?
...
if i got an xml file like this:
<?xml version="1.0" encoding="utf-8"?>
<name>
<id>1</id>
</name>
how can i read everything that i got
string id = ... (1 in this case);
...
Possible Duplicates:
Unique random numbers in O(1)?
How do you efficiently generate a list of K non-repeating integers between 0 and an upper bound N
I want to generate random number in a certain diapason, and I must be sure, that each new number is not a duplicate of formers. One solution is to store formerly generated numb...
hi
i like to load the qgif,qjpeg,qmng,qico,qsvg,qtiff as dynamic plug ins in Qt
because i dont what to break the Qt LGPL license is in the docs its says only about statically linking . link text
...
I'm writing an application which must log information pretty frequently, say, twice in a second. I wish to save the information to an sqlite database, however I don't mind to commit changes to the disk once every ten minutes.
Executing my queries when using a file-database takes to long, and makes the computer lag.
An optional solution...
I am looking for tips on how to package my Qt-based application for Ubuntu/Debian distributions. Let's say the application (executable) is myapp. Running objdump -p myapp | grep NEEDED, I see that it has the following dependencies:
libicuuc.so.44
libicui18n.so.44
libicudata.so.44
libQtGui.so.4
libQtCore.so.4
libpthread.so.0
libstdc++.so...