Search Results

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

Page 61/77 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Any Practical Alternative to the Signals + Slots model for GUI Programming?

    - by IntermediateHacker
    The majority of GUI Toolkits nowadays use the Signals + Slots model. It was Qt and GTK+, if I am not wrong, who pioneered it. You know, the widgets or graphical objects (sometimes even ones that aren't displayed) send signals to the main-loop handler. The main-loop handler then calls the events, callbacks or slots assigned for that widget / graphical object. There are usually default (and in most cases virtual) event-handlers already provided by the toolkit for handling all pre-defined signals, therefore, unlike previous designs where the developer had to write the entire main-loop and handler for each and every message himself (think WINAPI), the developer only has to worry about the signals he needs to implement new functionality on. Now this design is being used in most modern toolkits as far as I know. There are Qt, GTK+, FLTK etc. There is Java Swing. C# even has a language feature for it ( events and delegates ), and Windows Forms has been developed on this design. In fact, over the last decade, this design for GUI programming has become a kind of an unwritten standard. Since it increases productivity and provides greater abstraction. However, my question is: Is there any alternative design, that is parallel or practical for modern GUI programming? i.e Is the Signals + Slots design, the only practical one in town? Is it feasible to do GUI Programming with any other design? Are any modern (preferably successful and popular) GUI toolkits built on an alternative design?

    Read the article

  • Windows 7+ desktop apps - what's the best UI toolkit for a new project?

    - by Chris Adams
    I'm trying to make a decision for a new Windows desktop app: what to use for the UI. (This is a desktop app that needs to have compatibility with Windows 7. It won't be distributed on the Windows Store.) This application is going to be cross-platform. I intend on writing the core in C++, and using each platform's native UI toolkit. I feel this is preferable to using a cross-platform toolkit like Qt, as it allows me to keep the native look and feel of each platform. On the Windows side, the UI situation isn't exactly clear. I'm getting the feeling that Microsoft is slowly abandoning .NET, particularly as their preferred toolkit for desktop apps. Indeed, the Getting Started chapter for Windows 7, as well as the rest of Microsoft's documentation, seems to be more suited for C++. I have a few options here: C# with WPF - This sesms like this might be the best Microsoft has to offer for Windows 7 desktop apps, even if it isn't their "preferred" toolkit. I'd need to use P/Invoke to call my C++ code. C++ with Direct2D - This is what Microsoft used in one of their examples. This feels like it's too low-level. Part of the appeal of a higher-level UI toolkit is the consistency with the native look and feel of the platform, so doing this would just feel strange. C++ with a third-party UI toolkit, like Qt There might be some other options I'm missing, which I'd love to hear about. So, if you were starting a new Windows 7+ desktop app today, what would you use?

    Read the article

  • Develop for Desktop and mobile use?

    - by ran2
    I am in the very beginning of developing an app / desktop program. I want it to be cross-platform and possibly also as a tablet version (preferably Android Icecream sandwich). Note that I need to run it offline. I thought about the following approaches: ADOBE Air, since I do not need much performance. Plus I did some web programming in the past which might be of some use. Afaik it would run on OS X and Windows and should run on mobile OSes, too. Qt. Found some nice Qt based desktop recently and read it also works on android. Plus I like the SDK. HTML5 / JS. Again my web background should help me here. I wont need no sever side scripts, thus it should work without installing anything but a browser. How easy could this be converted into an Android app? There might be a plethora of other (better) ways to do it, but I haven't thought of them yet. Can you help out? How would you create such an application. Would it be better to do some pure desktop client and then create tablet versions? Would you rather start to create a website and worry later on how to turn into an app?

    Read the article

  • Getting error message when trying to start a virtual machine

    - by Sunil J
    I have been using VMWare on Windows for a long time. But after a long wait, I moved to VirtualBox on Ubuntu 11.10. I installed Ubuntu, 32 Bit, installed all available updates and installed Virtual Box. When I try to create a new Windows installation inside VirtualBox, I got the following error messages. 1st error dialogue VirtualBox - Error Failed to open a session for the virtual machine Windows XP.<br> The virtual machine '**Windows XP**' has terminated unexpectedly during startup with exit code 1.<p> Details<p> Result Code: <br> NS_ERROR_FAILURE (0x80004005)<br> Component: <br> Machine<br> Interface: <br> IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}<p> 2nd error dialogue **Virtualbox - Error in suplibOsinit**<br> **Kernal driver not installed (rc--1908)**<br> Please install the virtualbox-dkmbs package and execute 'modprobe vboxdrv' as root.<p> Steps I tried I have already tried reinstalling VirtualBox. Google result seem to indicate the the problem happens due to Kernel updates. Is there anyway I can get this working? I need this for malware analysis and if VirtualBox is going to crash on me all the time, then I won't be able to use Ubuntu for work. Output to dpkg -l | grep virtual server rc virtualbox 4.1.2-dfsg-1ubuntu1 x86 virtualization solution - base binaries rc virtualbox-qt 4.1.2-dfsg-1ubuntu1 x86 virtualization solution - Qt based user interface cute 'modprobe vboxdrv' as root.<p>

    Read the article

  • WPF - How to bind a DataGridTemplateColumn

    - by Andy T
    Hi, I am trying to get the name of the property associated with a particular DataGridColumn, so that I can then do some stuff based on that. This function is called when the user clicks context menu item on the column's header... This is fine for the out-of-the-box ready-rolled column types like DataGridTextColumn, since they are bound, but the problem is that some of my columns are DataGridTemplateColumns, which are not bound. private void GroupByField_Click (object sender, RoutedEventArgs e){ MenuItem mi = (MenuItem)sender; ContextMenu cm = (ContextMenu) mi.Parent; DataGridColumnHeader dgch = (DataGridColumnHeader) cm.PlacementTarget; DataGridBoundColumn dgbc = (DataGridBoundColumn) dgch.Column; Binding binding = (Binding) dgbc.Binding; string BoundPropName = binding.Path.Path; //Do stuff based on bound property name here... } So, take for example my 'Name' column... it's a DataGridTemplateColumn (since it has an image and some other stuff in there). Therefore, it is not actually bound to the 'Name' property... but I would like to be, so that the above code will work. My question is two-part, really: 1) Is it possible to make a DataGridTemplateColumn be BOUND, so that the above code would work? Can I bind it somehow to a property? 2) Or do I need to something entirely different, and change the code above? Thanks in advance! AT

    Read the article

  • 'Must Override a Superclass Method' Errors after importing a project into Eclipse

    - by Tim H
    Anytime I have to re-import my projects into Eclipse (if I reinstalled Eclipse, or changed the location of the projects), almost all of my overridden methods are not formatted correctly, causing the error 'The method ?????????? must override a superclass method'. It may be noteworthy to mention this is with Android projects - for whatever reason, the method argument values are not always populated, so I have to manually populate them myself. For instance: list.setOnCreateContextMenuListener(new OnCreateContextMenuListener() { public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { //These arguments have their correct names } }); will be initially populated like this: list.setOnCreateContextMenuListener(new OnCreateContextMenuListener() { public void onCreateContextMenu(ContextMenu arg1, View arg2, ContextMenuInfo arg3) { //This methods arguments were not automatically provided } }); The odd thing is, if I remove my code, and have Eclipse automatically recreate the method, it uses the same argument names I already had, so I don't really know where the problem is, other then it auto-formatting the method for me. This becomes quite a pain having to manually recreate ALL my overridden methods by hand. If anyone can explain why this happens or how to fix it .. I would be very happy. Maybe it is due to the way I am formatting the methods, which are inside an argument of another method?

    Read the article

  • jQuery: preventDefault() not working on input/click events?

    - by Jason
    I want to disable the default contextMenu when a user right-clicks on an input field so that I can show a custom contextMenu. Generally speaking, its pretty easy to disable the right-click menu by doing something like: $([whatever]).bind("click", function(e) { e.preventDefault(); }); And in fact, I can do this on just about every element EXCEPT for input fields in FF - anyone know why or could point me towards some documentation? Here is the relevant code I am working with, thanks guys. HTML: <script type="text/javascript"> var r = new RightClickTool(); </script> <div id="main"> <input type="text" class="listen rightClick" value="0" /> </div> JS: function RightClickTool(){ var _this = this; var _items = ".rightClick"; $(document).ready(function() { _this.init(); }); this.init = function() { _this.setListeners(); } this.setListeners = function() { $(_items).click(function(e) { var webKit = !$.browser.msie && e.button == 0; var ie = $.browser.msie && e.button == 1; if(webKit||ie) { // Left mouse...do something() } else if(e.button == 2) { e.preventDefault(); // Right mouse...do something else(); } }); } } // Ends Class

    Read the article

  • call back function set by JS settimeout doesn't work in IE8....

    - by NAG
    <html <head <script function addEvent( obj, type, fn ) { if ( obj.attachEvent ) { obj['e'+type+fn] = fn; obj[type+fn] = function(){obj['e'+type+fn]( window.event );} obj.attachEvent( 'on'+type, obj[type+fn] ); } else obj.addEventListener( type, fn, false ); } </script </head <body <!-- HTML for example event goes here -- <div id="mydiv" style="border: 1px solid black; width: 100px; height: 100px; margin-top: 10px;"</div <script // Script for example event goes here addEvent(document.getElementById('mydiv'), 'contextmenu', function(event) { display_short('right-clicked (contextmenu)'); }); function display_short(str) { clearTimeout(); document.getElementById('mydiv').innerHTML = str; if (str != '') alert("hello"); setTimeout("display_short('abcd')", 1000); } </script </body </html Behaves diffrently in IE and FF when you right click on the div area. In ff display_short will be called for evry 1 sec eventhough you dont release right click but in IE it will not call display_short if you dont release right click. But i expect in IE it should call display_short for every 1 sec if you dont release also. Is there any solution for this?

    Read the article

  • Cannot complete a basic task in QT4

    - by Harun Baris Bulut
    Hi all, I cannot open a new window in QT. I new in QT so I think I am missing something. I only write the code below and settings windows just shows itself and closes. I have commented out destructor but still problem persists. SettingsWindow s; s.show(); What do I do wrong ? By the way I cannot either debug it, debuger does not stop when it reaches to the first line for example. Thanks

    Read the article

  • FluentNhibernate IDictionary<Entity,ValueObject>

    - by Miguel Marques
    I had a mapping for a IDictionary<StocksLocation,decimal> property, this was the mapping: HasMany<StocksLocation>(mq => mq.StocksLocation) .KeyColumn("IDProduct") .AsEntityMap("IDLocation") .Element("Quantity", qt => qt.Type<decimal>()); Now i changed from decimal to a Value Object: Quantity. Quantity has two properties, decimal Value and Unit Unit (where Unit is an enum). I now have to map IDictionary<StocksLocation,Quantity>, how can i achieve this? Thanks in advance

    Read the article

  • Memory leak returning QIcon

    - by Stefano
    I started using Qt but I'm facing a big problem: I implemented my custom model that inhrerits from the QAbstractListModel class. What I want to do is to display a list with icon. All works and the image is shown with my code but it creates a memory leak. If I don't return the icon no memory leak is detected. class MyModel : public QAbstractListModel { public: ... private: QIcon myicon; } QVariant MyModel::data(const QModelIndex &index, int role) const { ... if (role == Qt::DecorationRole) { return this->myicon; } ... }

    Read the article

  • PySide / PyQt QStyledItemDelegate list in table

    - by danodonovan
    Dear All, I'm trying to create a table of lists in Python with Qt (PySide/PyQt - matters not) and my lists are squashed into the table cells. Is there a way to get the list delegates to 'pop out' of their cells? I've attached a simple code snippet - replace 'PySide' with 'PyQt4' depending on your preference from PySide import QtCore, QtGui class ListDelegate(QtGui.QStyledItemDelegate): def createEditor(self, parent, option, index): editor = QtGui.QListWidget(parent) for i in range( 12 ): editor.addItem('list item %d' % i) return editor if __name__ == '__main__': import sys app = QtGui.QApplication(sys.argv) model = QtGui.QStandardItemModel(2, 2) tableView = QtGui.QTableView() delegate = ListDelegate() tableView.setItemDelegate(delegate) tableView.setModel(model) for row in range(2): for column in range(2): item = QtGui.QStandardItem( 'None' ) model.setItem(row, column, item) tableView.setWindowTitle('example') tableView.show() sys.exit(app.exec_()) If you hadn't guessed I'm pretty new to this Qt lark Thanks in advance, Dan

    Read the article

  • Left Join in Subsonic 3

    - by user303187
    I'm trying to do a left join in subsonic 3 using linq but it doesn't seem to work, I get a big error. var post = from p in Post.All() join q in Quote.All() on p.ID equals q.PostID into pq where p.ID == id.Value from qt in pq.DefaultIfEmpty() select new {p, qt}; I'm using subsonic 3, latest GIT version from Rob, but I'm getting an error, see below, when I try a left join. I have searched but I didn't found any solution. Can anyone explain to me why the error and how to fix it? Thanks Expression of type 'System.Collections.Generic.IEnumerable1[GetAQuote.Post]' cannot be used for parameter of type 'System.Linq.IQueryable1[GetAQuote.Post]' of method 'System.Linq.IQueryable1[<>f__AnonymousType221[GetAQuote.Post], System.Collections.Generic.IEnumerable1%5BGetAQuote.Quote%5D, System.Linq.Expressions.Expression1[System.Func2%5BGetAQuote.Post,System.Int32%5D%5D, System.Linq.Expressions.Expression1[System.Func2%5BGetAQuote.Quote,System.Int32%5D%5D, System.Linq.Expressions.Expression1[System.Func3%5BGetAQuote.Post,System.Collections.Generic.IEnumerable1[GetAQuote.Quote],<>f__AnonymousType22%5BGetAQuote.Post,System.Collections.Generic.IEnumerable1%5BGetAQuote.Quote%5D%5D%5D%5D"GetAQuote.Post,System.Collections.Generic.IEnumerable1[GetAQuote.Quote]]] GroupJoin[Post,Quote,Int32,<f__AnonymousType22'`

    Read the article

  • How to develop a DirectFB app without leaving X.11 environment.

    - by Edu Felipe
    Hi folks, I'm trying to develop a GUI application for an embedded platform, without any windowing whatsoever and I'm doing that with DirectFB, and it suits my needs very fine. Since the embedded I develop for is not that powerful, I would really like to try to develop on my own Ubuntu desktop. The problem is Framebuffer is conflicting with X.org causing me to leave the whole desktop, and shutdown X.org just to see the result of my changes. Is there a good framebuffer simulator that suits my needs? Qt has one, called QVFb, but it only works for developing Qt apps, and the VNC back-end of DirectFB always crash. So, any ideas?

    Read the article

  • Tough question on WPF, Win32, MFC

    - by Mack
    Let's suppose you're an IT student with a basic knowledge of C++ and C#. Let's suppose that you want to design apps that: need to deliver some performance like archivers, cryptographic algorithms, codecs make use of some system calls have a gui and you want to learn an Api that will enable you to write apps like those described earlier and: is mainstream is future proof entitles you to find a decent job is easy enough - I mean easy like VCL, not easy like winapi So, making these assumptions, what Api will you choose? MFC, WPF, other? I really like VCL and QT, but they're not mainstream and I think few employers will want you to write apps in QT or Visual C++ Builder... Thanks for answers.

    Read the article

  • Porting Django's templates engine to C

    - by sandra
    Hi folks, I recently wrote a simple and tiny embedded HTTP server for my C++ app (QT) and I played a little bit with Ry's http-parser and loved it. This guy is crazy. So I told to myself: "Hey! Why not port the django template engine to C?" That'd be awesome! I know, it won't be an easy task (not at all, I know) but I'd really love to implement this. So I came here for inspiration, ideas, opinions... I'd really love to have some pointers on the subject, ideas, what is already done, which major problems I'll encounter (and how to solve them) - How not to reinvent the wheel... anyway, you got the idea :) Thanks a million times! P.S. Simple code snippets, and links to tools and libs are very welcome! P.P.S. I'm already aware of grantlee, I took a look into its sources. Well... that's C++ and its specific to Qt.

    Read the article

  • MinGW linking problem

    - by Tobias Langner
    I have a linking problem with MinGW. These are the calls: g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug/Simulation.exe debug/LTNetSender.o debug/main.o debug/simulation.o debug/moc_simulation.o -L'c:/Programmieren/Qt/4.5.2/lib' -lmingw32 -lqtmaind -LC:\Programmieren\Qt\boost_1_39_0\distrib\lib -LC:\Programmieren\MinGW\lib -llibboost_system-mgw34-mt -llibws2_32 -lQtSqld4 -lQtGuid4 -lQtNetworkd4 -lQtCored4 C:\Programmieren\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ ld.exe: cannot find -llibws2_32 The MinGW library directory is included in the library path and libws2_32.a is in this directory. Why isn't the linker finding the library?

    Read the article

  • Is JavaFx suitable for creating online multiplayer board/card games?

    - by Piniu
    In JavaFx i can easy create animations, moving pieces etc., but as far as i see there is better to write program logic and communication in java. Worst i see at the moment is calling javafx part as a result of data incoming from server. Is there any convenient way to do it or its better to change to other technology (flex, qt?) assuming it is not important if program will run in browser or outside as a standalone application? I just started to learn javafx but can drop it and move to other technology and consider c++ + wxWidgets or Qt which im more comforatable with.

    Read the article

  • What's the fastest way to check the availability of a SQL Server server?

    - by mwolfe02
    I have an MS Access program in use in multiple locations. It connects to MS SQL Server tables, but the server name is different in each location. I am looking for the fastest way to test for the existence of a server. The code I am currently using looks like this: ShellWait "sc \\" & ServerName & " qdescription MSSQLSERVER > " & Qt(fn) FNum = FreeFile() Open fn For Input As #FNum Line Input #FNum, Result Close #FNum Kill fn If InStr(Result, "SUCCESS") Then ... ShellWait: executes a shell command and waits for it to finish Qt: wraps a string in double quotes fn: temporary filename variable I run the above code against a list of server names (of which only one is normally available). The code takes about one second if the server is available and takes about 8 seconds for each server that is unavailable. I'd like to get both of these lower, if possible, but especially the fail case as this one happens most often.

    Read the article

  • Quicktime Audio Extraction for Compressed Movies

    - by Noorul
    Hi all, I am trying to extract audio from Quicktime Movie. I followed the steps in http://developer.apple.com/quicktime/audioextraction.html. It works fine.But When i try to extract any movies which is compressed(Audio is compressed as AAC), it gives a first chance exception.. In callstack it shows CoreAudioToolbox.dll... If is do continue it renders the audio without any issues. In Mac, this works without any issues. Is this really anything to worry about... I am a QT Beginner. Please help me My QT version is 7.6.7(1675) I am using Windows7

    Read the article

  • C# .NET Controls for docked tool windows?

    - by Brett Powell
    I was using Qt with C++ to develop my GUI applications, but I have recently switched to try out C# .NET as it is much easier to do what I need to. I was wondering what controls I need to be using for a few things and if they exist for C# .NET or if I need to do something custom/special. If you look in that screenshot, I want to do something similar to how they have each tool window grouped into its own docking area with the option of closing it or breaking it out of the layout so it can be dragged. I am talking about the tool windows titled "Groups", "Resources", "Tools", etc. I also want to make these tool windows stay in the same place when the main window is resized. Qt has spring like widgets that will let you create a UI that keeps its shape when the window is resized. Does anything like this exist in C# .NET?

    Read the article

  • C++ class initialisation containing class variable initialization

    - by Phil Hannent
    I noticed some code of a colleague today that initialized class variables in the initialization. However it was causing a warning, he says because of the order they are in. My question is why is it better to do variable initialization where it currently is and not within the curly brackets? DiagramScene::DiagramScene( int slideNo, QRectF screenRect, MainWindow* parent ) : QGraphicsScene( screenRect, parent ), myParent( parent ), slideUndoImageCurrentIndex(-1), nextGroupID(0), m_undoInProgress(false), m_deleteItemOnNextUndo(0) line(0), path(0) { /* Setup default brush for background */ scDetail->bgBrush.setStyle(Qt::SolidPattern); scDetail->bgBrush.setColor(Qt::white); setBackgroundBrush(scDetail->bgBrush); }

    Read the article

  • How to find out the dimensionality of print paper in javascript

    - by tzador
    I am generating reports in HTML formats, and want to print them automatically using Qt (qt has a webkit based browser, and one can render its contents to a PDF file). I want to position the elements of the report depending on the target page size. For that i need to access the size of the paper (preferably in pixels). Since i am using webkit, it has all the latest html5 and css3 features. is there some api available to access printed page properties inside javascript. for example, would be nice to write: window.print_paper.width or window.print_paper.height Thank you in advance

    Read the article

  • MySQL Query, how to group and count in one row ?

    - by Akarun
    Hi All, To simplify, I have tree tables: products, products-vs-orders, orders products fields : 'ProductID', 'Name', 'isGratis', ... products-vs-orders fields : 'ProductID', 'OrderID' orders fields : 'OrderID', 'Title', ... Actually, I have a query like this: SELECT orders.OrderID, orders.Title, COUNT(`products`.`isGratis`) AS "Quantity", `products`.`isGratis` FROM `orders`, `products-vs-orders`, `products` WHERE `orders`.`OrderID` = `products-vs-orders`.`OrderID` AND `products-vs-orders`.`ProductID` = `products`.`ProductID` GROUP BY `products`.`PackID`, `products`.`isGratis` This query works and return this surch of result: OrderID, Title, Quantity, isGratis 1 My Order 20 0 1 My Order 3 1 2 An other 8 0 2 An other 1 1 How can I retrieve the count of products 'gratis' and 'paid' in to separate cols ? OrderID, Title, Qt Paid, Qt Gratis 1 My Order 20 3 2 An other 8 1 Thanks for your help

    Read the article

  • C++: FFMPEG and SDL resources

    - by advs89
    I'm looking for resources (preferably books, but websites are fine too) for using FFMPEG and/or SDL with C++. Stuff I'd like to be able to do (eventually): Decode and play videos in realtime to a QT widget (the QT part isn't a problem) Overlay text and images on the video (in realtime) Loop video Cross-fade from one video to another (in realtime) Some kind of DVD functionality LIVE sources? (i.e. webcam, stream, etc.) So far I've looked at (and consider helpful) the following resources: FFMPEG and SDL Tutorial by Dranger (extremely helpful) StackOverflow: ffmpeg C API documentation/tutorial (not a duplicate, btw) Sample code bundled with FFMPEG libraries (I'll try and update this list with anything helpful below) Thanks for any help... Also: Operating System is Windows (but maybe one day cross-platform) Also 2: Resources using alternatives are welcome too... i.e. DirectShow, VFW, etc.

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >