Search Results

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

Page 39/77 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Is it possible to open a context menu from a map overlay item in android?

    - by John Nicholson
    This below code works fine opening an alert dialog. I was wondering if it's possible to open a context menu from within a map overlay class? @Override protected boolean onTap(int index) { OverlayItem item = mOverlays.get(index); AlertDialog.Builder dialog = new AlertDialog.Builder(mContext); dialog.setTitle(item.getTitle()); dialog.setMessage(item.getSnippet()); dialog.show(); return true; }

    Read the article

  • How do I add items to the Finder context menu in Mac OS X?

    - by mystro
    I'm in the process of porting a Windows application to OS X (we wrote it in Java so most of the code is portable), but what I'm currently unsure of is how to add context menu items in the Finder window when the user right clicks on an item (i.e. I wish to add some items to the the menu that has "Open" "Open with" , "Get Info", etc... when the user right clicks). Most of the articles I've found deal specifically with Windows (I've searched for "context menus" and "shell extension", but I believe I may be searching the wrong terms), so I'm curious as to how to go about adding this in Mac or what literature I should be reading.

    Read the article

  • Windows Explorer Context Menu Integration, get file that was right clicked on

    - by racxen
    I've already figured out how to add a menu item to the right click context menu of the windows explorer using the registry. I currently have it set to launch my application when my menu item is clicked. However, I want to know if there is a way to know what file is was right clicked on. I thought it would have been sent as a command line argument to the launched program, but it's not. Any ideas?

    Read the article

  • How can i create a context menu in c# in a datagridview

    - by lanoxx
    Hi all, I have written a datagridview with a couple of columns to store data of a product, now i want to be able to right click any row and have a context menu appear with the options delete and copy. Copy should have the same functionality as if I press Ctrl+C. Any help would be appreciated. Im using C# and WinForms. I have never done context menus before, so I would be thank full for any hint or link to further readings. Cheers

    Read the article

  • Button with text bellow icon

    - by Umesha MS
    Hi, I am very new to QT UI development. I need to create a button with text should be below the icon. There is no option to set this property to the QPushButton. When I tried to search in the net, they told me to use QToolButton. When I used the QToolButton I could set the Qt::ToolButtonTextUnderIcon. But I couldn’t find a way to change the dimension i.e. Width, height, x and y position. Please help me to display a icon with text should be bellow the icon.

    Read the article

  • How to disambiguate subdirs with the same name in the Projects list?

    - by jlstrecker
    My Qt project has 2 subdirs/subprojects with the same name. Their directories are myproject/node and myproject/compiler/test/node. The problem (or annoyance) is that, in the Projects list in Qt, both subdirs are listed as "node". So you have to open them up to figure out which is which. myproject.pro is like this: TEMPLATE = subdirs QMAKE_CLEAN = Makefile SUBDIRS += \ compiler_test_node \ node \ ... compiler_test_node.subdir = compiler/test/node node.depends = compiler_vuo_compile ... Without renaming the myproject/compiler/test/node directory, is there a way to make it show up with a different name in the Projects list?

    Read the article

  • Show menu when view is long pressed

    - by swift1691
    I've been looking around on the internet regarding my question but I couldn't find a straight answer. Is it possible to create a non-blocking menu similar to the overflow menu found in Android 4.0+ when a view is long pressed? I have a number of LinearLayout instances which have an OnLongClickListener which brings up a context menu, but it's not exactly what I am looking for. I was hoping for a smoother menu which is brought up when one of these instances is clicked, and removed when the user clicks outside of the menu's region. This is very similar to the way the overflow menu behaves in the Android ActionBar. So to sum up, is it possible to replicate the look-and-fell and the behavior of the overflow menu when using context menus? Here's hoping I don't have to jump through hoops to get the implementation that I desire. Thanks in advance. EDIT: After some digging I've found the PopupMenu which is exactly what I was looking for however it works only on devices running Honeycomb and above. Does anyone know of a way with which I can replicate this menu behavior in older versions of Android without using blocking windows like dialogs?

    Read the article

  • Double right click to Show a PopUpMenu with A TListView !!

    - by djiga4me
    Hi, I have a TListView and TPopupMenu, and I want to show a context menu when I right click on a TListItem. I tried the "AutoPopup" by assigning the component, but on a right click the PopupMenu is shown only and the wanted element is not selected. So i tried to use the "OnMouseDown", but we need to click and click again to show the menu on the wanted item. The first click is to select the item and the second shows the menu. But I want just a one click to do the two things. Do you have and idea about the problem? Thank you.

    Read the article

  • javascript context menu in iframe

    - by alex
    Hi, I have a problem with JQuery Context Menu ( link text ) and iframe. If i use it inside, the context menu is naturaly shown inside. But it will be partialy shown. I am searching how to resolve it. Please note that the context menu only appear when i click on specific iframe's elements. thanks :)

    Read the article

  • Enthought Canopy - passing sys.argv from PySide Qt program

    - by user2541559
    I've recently been looking at the Enthought distro of iPython. Today I decided to see if I could get some Qt GUI progs running and was successful after making minor changes. Simple example: import sys from PySide import QtGui # was 'from PyQT4 import QtGui' # app = QtGui.QApplication(sys.argv) -- not needed win = QtGui.QWidget() win.resize(320, 240) win.setWindowTitle("Hello MIT 6X!") win.show() sys.exit() # was 'sys.exit(app.exec_())' But I would like to be able to pass sys.argv in some cases. Most example code I see is in the form of the commented out 'app = ' line above. If I include it, I get 'RuntimeError: A QApplication instance already exists.' Suggestions for passing arguments appreciated. Nick

    Read the article

  • exposing subcontrols from the custom widget plugin in QT

    - by Santosh
    I am using QT 4.3. I have created one custom widget plugin. I could be able to show it in the desiner tool box as well as use it on the form with no problem. This custom widget internally holds QGroupBox, QLabel, QTextEdit. Now I want to apply the styles to individual componets of this custom widget. I want to expose these internal conrols as sub-control and style them. This would be similar to tear subcontrol of QTabWidget. In style sheet we can refer it as QTabWidget::tear... Is there any way by which I can do similar thing with my custom widget?

    Read the article

  • GUI by using Qt

    - by kishorebjv
    hi all... i dont know any thing about Qt other than my friend told that it generates the GUI for c++ code.... please let me know 1.How to execute some command when a button in window is clicked..? "g++ encryption.cpp -lgmp" command should be executed when i pressed "enc" button.. 2.How to accept the text from text area(in the window) to a textfile and the text(need not be text,it can be any data..) in a text file should be displayed in Textarea of window ? please help me out... im running out of time... thanks in advance....

    Read the article

  • C++ GUI using QT

    - by user1488019
    I want to build a c++ GUI using Qt plaform. this a part of my code which is about opening an image file. i used this method to open the image, but when i choose it from a specific folder nothing is shown (no image). void MainWindow::openI() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), QDir::currentPath()); if (!fileName.isEmpty()) { QImage image(fileName); if (image.isNull()) { QMessageBox::information(this, tr("Image Viewer"), tr("Cannot load %1.").arg(fileName)); return; } } } Please help me!! this is a small part of my project

    Read the article

  • How to play an .mp3 using QBuffer with Phonon in a PyQt Qt environment

    - by thedax
    With the code I have right now I CAN play .mp3 data from files succesfully. However I need to play the same data using a QtCore.QBuffer (NOT from a file). When I use the example of the docs it errors an unexpected type of QBuffer! However...... that is what it SHOULD see, according to the docs. But............... it throws: TypeError: Phonon.MediaObject.setCurrentSource(Phonon.MediaSource): argument 1 has unexpected type 'QBuffer' The code I use is (1): someBuffer = QtCore.QBuffer() someBuffer.writeData(TrackData) mediaObject.setCurrentSource(someBuffer) I also tried (2): someBuffer = QtCore.QBuffer() mediaObject.setCurrentSource(someBuffer) someBuffer.writeData(TrackData) and (3): someBuffer = QtCore.QBuffer() someBuffer.writeData(TrackData) mediaObject.setCurrentSource(Phonon.MediaSource(someBuffer)) The last example (3) throws an different ERROR and wipes my Gui off screen ;-) ASSERT: "d-connected" in file /builddir/build/BUILD/phonon-4.5.1/phonon/streaminterface.cpp, line xxxx Notes: TrackData contains the mp3 data and IS PLAYING OK when I write it to a File and use that as a resource to mediaObject.setCurrentSource(Phonon.MediaSource())I also experimented with a QByteArray but that leads to the same "unexpected QBuffer" error. To be more precise everything I feed setCurrentSource is not accepted. Tried a string (errors an unexpected type of String), tried a QBuffer (errors an unexpected type of QBuffer), tried a QByteArray (errors an unexpected type of QByteArray). BTW: I run Qt, PyQt on Linux. Any ideas??

    Read the article

  • QT- QImage and multi-threading problem.

    - by umanga
    Greetings all, Please refer to image at : http://i48.tinypic.com/316qb78.jpg We are developing an application to extract cell edges from MRC images from electron microscope. MRC file format stores volumetric pixel data (http://en.wikipedia.org/wiki/Voxel) and we simply use 3D char array(char***) to load and store data (gray scale values) from a MRC file. As shown in the image,there are 3 viewers to display XY,YZ and ZX planes respectively. Scrollbars on the top of the viewers use to change the image slice along an axis. Here is the steps we do when user changes the scrollbar position. 1) get the new scrollbar value.(this is the selected slice) 2) for the relavant plane (YZ,XY or ZX), generate (char* slice;) array for the selected slice by reading 3D char array (char***) 3) Create a new QImage* (Format_RGB888) and set pixel values by reading 'slice' (using img-setPixel(x,y,c);) 4) This new QImage* is painted in the paintEvent() method. We are going to execute "edge-detection" process in a seperate thread since it is an intensive process.During this process we need to draw detected curve (set of pixels) on top of above QImage*.(as a layer).This means we need to call drawPoint() methods outside the QT thread. Is it the best wayto use QImage for this case? What is the best way to execute QT drawing methods from another thread? thanks in advance,

    Read the article

  • Simple menubar using Qt4

    - by Buzz
    Hi all i'm trying to make a simple GUI with QT 4.6. i made a separete class that represents the menu bar: MenuBar::MenuBar() { aboutAct = new QAction(tr("&About QT"), this); aboutAct->setStatusTip(tr("Show the application's About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); quitAct = new QAction(tr("&Quit"),this); quitAct->setStatusTip(tr("Exit to the program")); //connect(quitAct, SIGNAL(triggered()), &QApp, SLOT(quit())); menuFile = new QMenu("File"); menuFile->addAction(quitAct); menuLinks = new QMenu("Links"); menuAbout = new QMenu("Info"); menuAbout->addAction(aboutAct); addMenu(menuFile); addMenu(menuLinks); addMenu(menuAbout); } i can't connect the signal of the quitAct with the quit slot of the main application probably because it is not visible from the MenuBar class.. //connect(quitAct, SIGNAL(triggered()), &QApp, SLOT(quit())); how can i do it?

    Read the article

  • Creating a QMainWindow from Java using JNI

    - by ebasconp
    Hi everybody: I'm trying to create a Qt main windows from Java using JNI directly and I got a threading error. My code looks like this: Test class: public class Test { public static void main(String... args) { System.out.println(System.getProperty("java.library.path")); TestWindow f = new TestWindow(); f.show(); } } TestWindow class: public class TestWindow { static { System.loadLibrary("mylib"); } public native void show(); } C++ impl: void JNICALL Java_testpackage_TestWindow_show (JNIEnv *, jobject) { int c = 0; char** a = NULL; QApplication* app = new QApplication(c, a); QMainWindow* mw = new QMainWindow(); mw->setWindowTitle("Hello"); mw->setGeometry(150, 150, 400, 300); mw->show(); QApplication::exec(); } and I get my window painted but frozen (it does not receive any event) and the following error message when instantiating the QMainWindow object: QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread I know all the UI operations must done in the UI thread but in my example I created the QApplication in the only thread I have running, so, everything should work properly. I did some tests executing the code of my "show" method from a QMetaObject::invokeMethod stuff using Qt::QueuedConnection but nothing works properly. I know I could use Jambi... but I know that it could be done natively too and that is what I want to do :) Any ideas on this? Thanks in advance! Ernesto

    Read the article

  • Qt4Dotnet on Mac OS X

    - by Tony
    Hello everyone. I'm using Qt4Dotnet project in order to port application originally written in C# on Linux and Mac. Port to Linux hasn't taken much efforts and works fine. But Mac (10.4 Tiger) is a bit more stubborn. The problem is: when I try to start my application it throws an exception. Exception states that com.trolltech.qt.QtJambi_LibraryInitializer is unable to find all necessary ibraries. QtJambi library initializer uses java.library.path VM environment variable. This variable includes current working directory. I put all necessary libraries in a working directory. When I try to run the application from MonoDevelop IDE, initializer is able to load one library, but the other libraries are 'missing': An exception was thrown by the type initializer for com.trolltech.qt.QtJambi_LibraryInitializer --- java.lang.RuntimeException: Loading library failed, progress so far: No 'qtjambi-deployment.xml' found in classpath, loading libraries via 'java.library.path' Loading library: 'libQtCore.4.dylib'... - using 'java.library.path' - ok, path was: /Users/chin/test/bin/Debug/libQtCore.4.dylib Loading library: 'libqtjambi.jnilib'... - using 'java.library.path' Both libQtCore.4.dylib and libqtjambi.jnilib are in the same directory. When I try to run it from the command prompt, the initializer is unable to load even libQtCore.4.dylib. I'm using Qt4Dotnet v4.5.0 (currently the latest) with QtJambi v4.5.2 libraries. This might be the source of the problem, but I'm neither able to compile Qt4Dotnet v4.5.2 by myself nor to find QtJambi v4.5.0 libraries. Project's page states that some sort of patch should be applied to QtJambi's source code in order to be compatible with Mono framework, but this patch hasn't been released yet. Without this patch application crashes in a strange manner (other than library seek fault). I must note that original QtJambi loads all necessary libraries perfectly, so it might be issues of IKVM compiler used to translate QtJambi into .Net library. Any suggestions how can I overcome this problem?

    Read the article

  • Visual C++ 2008 runtime error-- debug vs release exe problem?

    - by larryq
    Hi everyone, I have a Windows executable (native, not .Net) project that I'm trying to pass along to a new team member. It's a graphics modeling tool that uses the Qt widget library and OpenGL. The project runs fine on my box but when we buld and link it on this new member's machine and he tries deubugging it, here's what he sees (not all entries included, for brevity): ModelingTool.exe': Loaded 'C:\ModelingTool\ModelingTool\ModelingTool\Debug\ModelingTool.exe', Symbols loaded. 'ModelingTool.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file 'ModelingTool.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file 'ModelingTool.exe': Loaded 'C:\Windows\System32\opengl32.dll', Cannot find or open the PDB file 'ModelingTool.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file 'ModelingTool.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Cannot find or open the PDB file 'ModelingTool.exe': Loaded 'C:\Qt\4.2.2\bin\Qt3Supportd4.dll', Symbols loaded. 'ModelingTool.exe': Loaded 'C:\Program Files\Spyware Doctor\smum32.dll', Binary was not built with debug information. Debugger:: An unhandled non-continuable exception was thrown during process load The program '[5936] ModelingTool.exe: Native' has exited with code -1072365566 (0xc0150002). Would anyone care to guess what's wrong here? Some sort of debug-release mismatch perhaps?

    Read the article

  • How to use QCOMPARE Macro to compare events

    - by vels
    Hi, I have MyWindow class which popus a blank window, which accepts a mouse click, I need to unit test the mouse click event Code snippet: void TestGui::testGUI_data() { QTest::addColumn<QTestEventList>("events"); QTest::addColumn<QTestEventList>("expected"); Mywindow mywindow; QSize editWidgetSize = mywindow.size(); QPoint clickPoint(editWidgetSize.rwidth()-2, editWidgetSize.rheight()-2); QTestEventList events, expected ; events.addMouseClick( Qt::LeftButton, 0, clickPoint); expected.addMouseClick( Qt::LeftButton, 0, clickPoint); QTest::newRow("mouseclick") << events << expected ; } void TestGui::testGUI() { QFETCH(QTestEventList, events); QFETCH(QTestEventList, expected); Mywindow mywindow; mywindow.show(); events.simulate(&mywindow); QCOMPARE(events, expected); } // prints FAIL! : TestGui::testGUI(mouseclick) Compared values are not the same How to test the mouse click on mywindow. is there any beeter approach to unit test mouse events? Thanks, vels

    Read the article

  • My QFileSystemModel doesn't work as expected in PyQt

    - by Skilldrick
    I'm learning the Qt Model/View architecture at the moment, and I've found something that doesn't work as I'd expect it to. I've got the following code (adapted from Qt Model Classes): from PyQt4 import QtCore, QtGui model = QtGui.QFileSystemModel() parentIndex = model.index(QtCore.QDir.currentPath()) print model.isDir(parentIndex) #prints True print model.data(parentIndex).toString() #prints name of current directory childIndex = model.index(0, 0, parentIndex) print model.data(childIndex).toString() rows = model.rowCount(parentIndex) print rows #prints 0 (even though the current directory has directory and file children) The question: Is this a problem with PyQt, have I just done something wrong, or am I completely misunderstanding QFileSystemModel? According to the documentation, model.rowCount(parentIndex) should return the number of children in the current directory. The QFileSystemModel docs say that it needs an instance of a Gui application, so I've also placed the above code in a QWidget as follows, but with the same result: import sys from PyQt4 import QtCore, QtGui class Widget(QtGui.QWidget): def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) model = QtGui.QFileSystemModel() parentIndex = model.index(QtCore.QDir.currentPath()) print model.isDir(parentIndex) print model.data(parentIndex).toString() childIndex = model.index(0, 0, parentIndex) print model.data(childIndex).toString() rows = model.rowCount(parentIndex) print rows def main(): app = QtGui.QApplication(sys.argv) widget = Widget() widget.show() sys.exit(app.exec_()) if __name__ == '__main__': main()

    Read the article

  • QSqlQuery UPDATE/INSERT DateTime with server's time (eg CURRENT_TIMESTAMP)

    - by Skinniest Man
    I am using QSqlQuery to insert data into a MySQL database. Currently all I care about is getting this to work with MySQL, but ideally I'd like to keep this as platform-independent as possible. What I'm after, in the context of MySQL, is to end up with code that effectively executes something like the following query: UPDATE table SET time_field=CURRENT_TIMESTAMP() WHERE id='5' The following code is what I have attempted, but it fails: QSqlQuery query; query.prepare("INSERT INTO table SET time_field=? WHERE id=?"); query.addBindValue("CURRENT_TIMESTAMP()"); query.addBindValue(5); query.exec(); The error I get is: Incorrect datetime value: 'CURRENT_TIMESTAMP()' for column 'time_field' at row 1 QMYSQL3: Unable to execute statement. I am not surprised as I assume Qt is doing some type checking when it binds values. I have dug through the Qt documentation as well as I know how, but I can't find anything in the API designed specifically for supporting MySQL's CURRENT_TIMESTAMP() function, or that of any other DBMS. Any suggestions?

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >