Does anyone know if it is possible to have a C++ class with overloaded operators such as +,-,* and declare it somehow (this is where the magic happens) to a QtScriptEngine such that js-expressions like "a+b" are evaluated as they would be on the C++ side?
...
Hi all,
I am having an listview filled with the items, by default the 0th item will be selected.
If I try to navigate the list using mobile keypad its not gaining focus, instead i need to use my mobile select key for focus. In this process my mobile left soft key gets change do “Done” I don’t know why this “Done” menu is appearing in my...
Hi,
I am opening a page in QtWebView (in PyQt if that matters) and I want to open all links in the system default browser. I.e. a click on a link should not change the site in the QtWebView but it should open it with the default browser. I want to make it impossible to the user to change the site in the QtWebView.
How can I do that?
T...
I am working on a mapping application and need to display the data objects using a table, a form and as graphical objects in the map. I'm using PyQt, but that's not really important as this is a Qt question not a Python question.
If I only needed the table and form views this would be easy, I'd just use the Qt Model/View framework. Howe...
Hi,
I use this code to validate some properties of a set of Qt objects in ChaiScript:
/// initialize the engine
boost::shared_ptr<chaiscript::ChaiScript> chai;
chai.reset(new chaiscript::ChaiScript());
std::cout << "ChaiScript engine created!!!" << std::endl;
///
/// register elements
//
assert(ui->che...
Hi,
I want to make a QT4 (using QT designer) dialog, that contains a part where a file has to be selected.
Now, I know QFileDialog exists, and I can program something that does what I want.
But can I also just do it in QT designer?
Is there some way to get a "file select" widget in QT designer?
Or, I remember these buttons, having the...
Greetings ,
I my QT application,I have a base class as follows.I am using QObject because I want to use Signal-Slot mechanism in all derived classes.
class IRzPlugin : public QObject {
public:
virtual void registerMenu(QWidget*);
virtual void execute();
}
Then I have another class as follows.I need to extend from QWidget because...
I need to get it working in a Qt4 project, both on OSX and Win32.
Seems to be possible with native controls (see here and here) so now I'm looking for some Qt code to do it. Thanks in advance!
...
Hi everyone,
I am doing some tests in Qt Quick (Qt Declarative and QML), and i would like to inspect the elements composing the declarative interface.
For example, if i have a declarative GUI composed of a rectangle and two images, i would like to have a list with three (or more) elements with these widgets (or items in Qt Declarative)...
I have an application written in C++ using Qt4.4.3 on Linux.
Doing some benchmarking, I create a large number of rectangles and compare the difference of performance of drawing various line styles. The worst performance is the “dotted” line style, the “dashed” line style is much faster.
It would seem to me that these should not vary so...
I would like for a user to be able to "delete" a frame from a series of frames in a vertical layout using the delete/backspace keys on the keyboard, but I do not know how to make it so that a frame is selectable. Does any one know of a way to do this (in C++)?
Thank you in advance!
...
Is it possible to get the bounding box of the output of QGLWidget::renderText() in logical or window coordinates? How?
...
I think this problem is best described in code. I'm sure the solution is close, I just haven't been able to find it. I've been looking over the Qt4 api as well as doing tutorials. Here is my code so far:
require 'Qt4'
class PictureCommentForm < Qt::Widget
def initialize(parent = nil)
super()
#setFixedSize(300, 100)
@comm...
I'm trying to encode a URL while using Qt 4. It looks like in Qt 3, the method was QUrl::encode, but apparently QUrl was rewritten from Qt 3 to Qt 4. I looked in the documentation and didn't see any equivalent method. Is there something I'm missing?
...
I need to copy a number of image files from a given location to a given directory, i need the original filename preserved.
can it be something like
url->copy(img14, ImgPath);
where img14 is the path to the file including the filename and the imgpath is the destination directory.
img14 can be : /home/obscurant1st/Downloads/aaa.jpeg
or...
I have to run a system command in Qt.
but I have to give an argument for that command.
for example opening gedit with a text file.
like "gedit /home/oDx/Documents/a.txt"
but the path "/home/oDx/Documents/a.txt" will be in a variable like "docPath".
so how can i do it!?
...
Hi,
I need to develop some application using OpenGL in Qt for Symbian platform. I found a function called loadScene in Qt3 that where used to load 3ds files but couldn't find any for the latest version of Qt.
Is there any library that I could use ?
Thanks,
Alexandre
...
How to set the color of margins in a QGridLayout? I want to show the different columns and rows separately by placing lines between various rows and columns.
In other words, how to display items in grid-layout such that they are in a table.
...
Hi Geeks,
Can anybody tell if I can use the Windows APIs in my qt application?
If yes can anybody tell me the procedure to do it? I need to use the msdn winapi "GetSystemPowerStatus" in my qt application to show the battery status in my qt GUI based application.
...
I'm doing some HiD programming and I'm trying to locate HiD.lib file to add to my .pro Qt file. However I can't find it. Below is an excerpt of said file:
win32:LIBS+=-lSetupAPI.lib -L"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib" \
-lKernel32.lib -L"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib" \
-lHi...