Search Results

Search found 1902 results on 77 pages for 'qt contextmenu'.

Page 45/77 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • Table and Image in a single page of QTextDocument in Qt4

    - by liaK
    Hi, I want to display a table and a image side by side. i.e Left side the image and right side the table. I want this because the image is the reference image for the data present in the table. I want that output in pdf. So I am using QTextDocument, QTextCursor and QPrinter to get the output in pdf. So how it is possible to display the image and table in QtextDocument i.e within a single page of the pdf? I am using Qt 4.5.3 and Windows Xp. Any pointers regarding this are welcome.

    Read the article

  • Custom editor in QAbstractTableModel

    - by Martin Beckett
    Does anyone have an example of using a QWidget as an editor in a QAbstractTableModel? I have a column which when edited should create a QCombobox with the list of choices. The docs seem to suggest I need to write a QAbstractItemDelegate and a custom paint function but that seems overkill to simply pop-up a standard QCombobox in Qt::EditRole. Note - the combo box contents are the same for every row and it only needs to be shown when somebody clicks in the cell. I know this should be simple but I can't get it to work. It's easy for a QTableWidget based table - but I need it for a very large data table.

    Read the article

  • How set opacity on QGraphicsItem

    - by La Chamelle
    Hello, i have a inherited from QGraphicsScene and QGraphicsItem to create my own classes. I use Qt 4.6. I want to set a specific opacity on each items of my scene. I use setOpacity : setOpacity method, but its not the result i hope. I want to have for example one item opaque and an other transparent (to see the desktop, or the other application). But if i dont set the opacity of the QGraphicsView to 0.5, i have not the transparancy. And if the QGraphicsView is set to 0.5, the item is not real opaque. What should i do ? Thanks you.

    Read the article

  • Brew install pyqt mavericks

    - by user3722876
    I have some trouble installing PyQt on my Mac. HOMEBREW_VERSION: 0.9.5 ORIGIN: https://github.com/Homebrew/homebrew.git HEAD: d8af29d63a5b94ffee863788210c3a895315035f HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar CPU: quad-core 64-bit sandybridge OS X: 10.9.3-x86_64 Xcode: 5.1.1 CLT: 5.1.0.0.1.1396320587 Clang: 5.1 build 503 MacPorts/Fink: /opt/local/bin/port X11: 2.7.6 => /opt/X11 System Ruby: 2.0.0-451 Perl: /usr/bin/perl Python: /opt/local/bin/python => /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 Ruby: /usr/bin/ruby sip installation ok qt installation ok brew install pyqt => make 1 error generated. make[1]: *** [qtlib.o] Error 1 1 error generated. make[1]: *** [siplib.o] Error 1 make: *** [all] Error 2 No idea what's happening...

    Read the article

  • QtScript: Passing an array of objects to C++

    - by Plow
    Hi, I want to pass an array of objects from my QtScript to C++ but I have not been able to figure out how to achieve this. As soon as I create an array, the elements inside it are converted to strings before I can access them. This is what I have been trying so far: class myObject : public QObject, public QScriptable { Q_OBJECT public Q_SLOTS: void test(QVariantList list); }; void myObject::test(QVariantList list) { for (QVariantList::const_iterator it = list.begin(); it != list.end(); ++it) { QVariant element = *it; qDebug() << "List element type: " << element.typeName(); if (element.canConvert<QVariantMap>()) { // Not getting here } } } The following script myObject.test([{"foo": 1, "bar": 2}, {"baaz": 3, "baaaz": 4}]); prints List element type: "QString" List element type: "QString" I am using Qt 4.6...

    Read the article

  • problem with QDataStream & QDataStream::operator>> ( char *& s )

    - by yan bellavance
    QFile msnLogFile(item->data(Qt::UserRole).toString()); QDataStream logDataStream; if(msnLogFile.exists()){ msnLogFile.open(QIODevice::ReadOnly); logDataStream.setDevice(&msnLogFile); QByteArray logBlock; logDataStream >> logBlock; } This code doesnt work. The QByte that results is empty. Same thing if I use a char* . Oddely enough the same code works in another program. Im tying to find the difference between both. This works if i use int,uint, quint8, etc

    Read the article

  • Is it possible to use HTTPS certificates for licensing?

    - by Ton van den Heuvel
    I am working on an application with multiple clients and a server running various web-services for the clients. To implement licensing I am thinking about using HTTPS as a protocol for the web-services using certificates that are issued by our company. By influencing the expiration date of a certificate for a client we can prevent them from using our software after their license term. It this possible and does it make sense to you? Additional information: I am planning on using Qt/C++ for the clients, and the Twisted framework for the web-services.

    Read the article

  • How to change the text color of a QxtLabel

    - by dwj
    I'm checking out libqxt (an extension library for Qt) and cannot change the text color of a QxTLabel; it's driving me nuts. QxTLabel extends QFrame. QFrame doesn't know anything about text. I tried changing the palette via the Form Editor but that didn't appear to do anything either. I also tried to change the style sheet but, again, QFrame doesn't know about text and QxTLabel isn't giving anything up either. Nothing is jumping out at me from the full member list for QxTLabel either. Thoughts?

    Read the article

  • How to use QMetaMethod with QObject::connect

    - by VestniK
    I have two instances of QObject subclasses and two QMetaMethod instances of signal in one of objects and slot in another object. I want to connect this signal and slot with each other. I've looked through the qobject.h file and find that SIGNAL() and SLOT() macro are just add "1" or "2" character to the beginning of method signature so it looks like it should be possible to add the same character to the beginning of string returned by QMetaMethod::signature() but this approach depends on some undocumented internals of toolkit and may be broken at any time by a new version of Qt. Does anybody know reliable way to connect signals and slots through their QMetaMethod reflection representation?

    Read the article

  • whats wrong with this peace of code for saving contacts

    - by Shadow
    Hi, i am using the latest Nokia Qt SDK. i have tried to add the contacts, its not getting added.. what is missing here.. // Construct contact manager for default contact backend QContactManager* cm = new QContactManager("simulator"); // QContactManager* cm = new QContactManager("memory"); // i tried this, its also not working // Create example contact QContact example; // Add contact name QContactName name; name.setFirstName("John"); name.setLastName("Doe"); example.saveDetail(&name); // Add contact email address //QContactEmailAddress email; // email.setContexts(QContactDetail::ContextHome); //email.setEmailAddress(“[email protected]”); // example.saveDetail(&email); // Finally, save the contact details cm->saveContact(&example); delete cm; Thanks

    Read the article

  • Can't catch newConnection() signal from QTcpServer

    - by Bob
    I am trying to make a simple server thread in QT to accept a connection, however although the server is listening (I can connect with my test app) I can't get the newConnection() signal to be acted on. Any help as to what I'm missing here would be much appreciated! class CServerThread : public QThread { Q_OBJECT protected: void run(); private: QTcpServer* server; public slots: void AcceptConnection(); }; void CServerThread::run() { server = new QTcpServer; QObject::connect(server, SIGNAL(newConnection()), this, SLOT(AcceptConnection())); server-listen(QHostAddress::Any, 1000); // Any port in a storm exec(); // Start event loop } void CServerThread::AcceptConnection() { OutputDebugStringA("\n***** INCOMING CONNECTION"); // This is never called! }

    Read the article

  • How can I load scripts, styles and images from a non-URL source?

    - by Jen
    I am integrating WebKit (via Qt) into an application. Instead of having WebKit retrieve scripts, CSS files and images via URLs, I want my application to provide them (e.g. retrieved from a database). For example, a "regular" web page may contain this tag: <IMG src="photos/album1/123456.jpg"> Instead of WebKit fetching this image from a server or the file system, I would prefer some kind of callback that allows my application to provide this image. How can I accomplish this?

    Read the article

  • How to split movie and play parts to look as a whole?

    - by luksow
    I'm writing software which is demonstraiting video on demand service. One of the feature is something similiar to IIS Smooth Streaming - I want to adjust quality to the bandwith of the client. My idea is, to split single movie into many, let's say - 2 seconds parts, in different qualities and then send it to the client and play them. The point is that for example first part can be in very high quality, and second in really poor (if the bandwith seems to be poor). The question is - do you know any software that allows me to cut movies precisly? For example ffmpeg splits movies in a way that join is visible and really annoying (seconds are the measure of precision). I use qt + phonon as a player if it matters. Or maybe you know any better way to provide such feature, without splitting movie into parts?

    Read the article

  • Linkage Error with Inherited Class

    - by metdos
    I have static library and another program which uses it. In the static library If I define header without inheretence it works fine. class TcpCommunication On the other hand If I use inheretence with a QT class, class TcpCommunication:public QTcpServer I'm getting linkage error when I compiling code which uses this static library. >MStoDKAPId.lib(TcpCommunication.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QTcpServer::~QTcpServer(void)" (__imp_??1QTcpServer@@UAE@XZ) referenced in function "public: virtual __thiscall TcpCommunication::~TcpCommunication(void)" (??1TcpCommunication@@UAE@XZ) What can be the problem? Thanks.

    Read the article

  • Which file is the COM++ object and how do I import it to .NET?

    - by Bad Man
    I'm trying to write a COM++ object wrapper around a Qt widget (control) I wrote so I can use it in future .NET projects. e.g.: public __gc class comWidget; In the compile directory are the .exe, an exe.intermediate.manifest, and the comWidget.obj, and also some other crap files (.pdb, etc). So what/how do I import into .NET? I feel like I'm missing an important step for registering the object or whatever, but all these tutorials are terrible outdated and ridiculously unhelpful (for instance, I'm using the old CLR syntax because I can't find any good docs on the new stuff, thx again M$ for being lazy faggots as usual)

    Read the article

  • How to Optimize Combined Graphical Operations?

    - by Sunny
    Hi, Here is a Scenario, A series of operations that I will call for painting, QPainter p(this); 1). p.fillRect(0,0,320,240, RED_COLOR) 2) p.drawLine(0,0,100,100, BLUE_COLOR) 3) p.fillRect(0,0,320,240, YELLOW_COLOR) Now I want that painter should not draw first FillRect Function. It should not draw line. It should only perform last operation. Is there any way to achive this optimization in Qt. Is this type of drawing/painting optimizations are supported by any library?

    Read the article

  • How to detect an active x component that does not respond any more?

    - by koschi
    My application is written in C++ and uses the Qt framework. I use the QAxWidget class to access an active x component. Now I need some kind of mechanism that notifies my application each time the active x component has crashed or does not respond any more (due to dead lock or infinite loop). (1) can easily been done by watching the external process of the active x component. But maybe there is a more elegant approach? But how can (2) be implemented?

    Read the article

  • whats wrong with this piece of code for saving contacts

    - by Shadow
    Hi, i am using the latest Nokia Qt SDK. i have tried to add the contacts, its not getting added.. what is missing here.. // Construct contact manager for default contact backend QContactManager* cm = new QContactManager("simulator"); // QContactManager* cm = new QContactManager("memory"); // i tried this, its also not working // Create example contact QContact example; // Add contact name QContactName name; name.setFirstName("John"); name.setLastName("Doe"); example.saveDetail(&name); // Add contact email address //QContactEmailAddress email; // email.setContexts(QContactDetail::ContextHome); //email.setEmailAddress(“[email protected]”); // example.saveDetail(&email); // Finally, save the contact details cm->saveContact(&example); delete cm; Thanks

    Read the article

  • How to pass a function to a function?

    - by ShaChris23
    Suppose I have a class with 2 static functions: class CommandHandler { public: static void command_one(Item); static void command_two(Item); }; I have a problem DRY problem where I have 2 functions that have the exact same code for every single line, except for the function that it calls: void CommandOne_User() { // some code A CommandHandler::command_one(item); // some code B } void CommandTwo_User() { // some code A CommandHandler::command_two(item); // some code B } I would like to remove duplication, and, ideally, do something like this: void CommandOne_User() { Function func = CommandHandler::command_one(); Refactored_CommandUser(func); } void CommandTwo_User() { Function func = CommandHandler::command_one(); Refactored_CommandUser(func); } void Refactored_CommandUser(Function func) { // some code A func(item); } I have access to Qt, but not Boost. Could someone help suggest a way on how I can refactor something like this?

    Read the article

  • How to implement the "Edit" menu with "Undo", "Cut", "Paste" and "Copy"?

    - by BastiBense
    Greetings, for one of my applications I'm trying to implement an "Edit" menu. This menu usually has the standard-entries Undo, Cut, Copy and Paste. This menu is not there by default, and users seem to expect it especially on Mac OS X. Is there a an easier way of implementing this, without doing so in every widget manually? Since most widgets have the copy/paste/undo mechanism already implemented via shortcuts, I'd like to provide a few simple menu actions that call them as well. The actions should call whatever widget has the focus first, then they should pass the events upwards the object chain, I guess. I'm using Qt 4.6 on Windows, Linux and Mac OS X. Thanks!

    Read the article

  • What is the correct way to customize Icon and Text position of items in a QListView?

    - by petermcg
    I'm using C++ and Qt's (4.6) model/view framework and wondering what is the correct way to change the display of items in a QListView or a class derived from QListView from: to: I'm not concerned about the sort order or Flow, I'm interested in the best way to correctly position the text to the right of the icon. If this can only be done by writing a custom QStyledItemDelegate that's totally fine, I want to rule out whether this is the correct approach or whether it's best to look at setLayout or similar, example code would help. The example application I'm looking at is the 'interview' example from qtdemo which amongst other things displays icons and text in a QListView.

    Read the article

  • How to get tag parameter value with XQuery

    - by uni
    For example i have this xml. I need to get value of parameter val of tag foo with id="two" <top> <sub id="one"> <foo id="two" val="bar" /> sometext </sub> </top> Whis this query (using Qt QXmlQuery): doc('test.xml')/top/sub[@id='one']/foo[@id='two']/<p>{@val}</p> I receive <p val="bar"/>, but I need only text "bar" without any tags. I tried to remove <p> and </p> and receive syntax error, unexpected { How can i get parameter value without any tags?

    Read the article

  • How to check that a regular expression fall into infty loop or not?

    - by Sorush Rabiee
    I'm trying to learn and hopefully use regular expression with Qt. I found that some patterns cause handler to fall into loop. for example searching \b\b in a text, never will terminate. and number of these expressions is infinite (\b\b\b,\b\b\b\b and so on). I'd like to determine and control all invalid expressions. Is there an algorithm to distinguish valid and invalid expressions? If not, how can I prevent my program from falling into an infinite loop?

    Read the article

  • Numeric GUI bottleneck

    - by Physic
    Hi all, I've made a GUI to set up and start a numerical integrator using PyQT4, Wing, QT, and Python 2.6.6, on my Mac. The thing is, when I run the integrator form the GUI, it takes very many times longer than when I crudely run the integrator from the command line. As an example, a 1000 year integration took 98 seconds on the command line and ~570 seconds from the GUI. In the GUI, the integration runs from a thread and then returns. It uses a a queue to communicate back to the GUI. Does anyone have any ideas as to where the bottleneck is? I suspect that others may be experiencing something like this just on a smaller scale. t = threading.Thread( target=self.threadsafe_start_thread, args=( self.queue, self.selected ) ) t.start() Thanks!

    Read the article

  • qmake library reordering

    - by user1095108
    I put this into a qmake file: QTPLUGIN += component LIBS += -L../lib -lmodule -lcomponent -lnetworking But qmake reorders the libraries behind my back: g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro -o testb .obj/constants.o .obj/main.o .obj/qrc_application.o -L/usr/lib -L../lib -lmodule -lnetworking -lcomponent -lQtGui -lQtNetwork -lQtCore -lpthread Probably because component is a static plugin. But it has a static dependency on the networking library and hence the reordering causes a link error. It is a static dependency and hence is ok in my opinion. How to work around this? I'm using qt 4.8.1.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >