[Interest] Glueing widgets together
Dear all, I've posted some time ago a question about moving widgets simultaneously. However, the proposed solutions were unsatisfactory. That is probably because I've expressed my needs in a non useful way. So here it goes. I need to glue together two widgets, so that when one moves, the other *simultaneously* moves. They should appear glued even when dragging around, fast and slow. Like if the follower is simply painted over the moving widget. The proposed solutions involve getting the mouse move events dealt with. This resulted in a visible delay, and that isn't what I want: I don't want to see the window moving with the follower staying still, and after few instants, the follower (disappearing from where it was) painted in the right position. Is there any way I can achieve this visual effect? Thanks Cheers! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Glueing widgets together
Hi Sensei, I have a master dialog with a slave dialog attached to one border. This was done using eventFilter in the slave to listen to the master Move and Resize events - not MouseMove. It's only 10 lines of code, works well and there is no jerkiness. It put the code in the slave, since it can be attached to many different dialogs in my app. The same code should work for peer dialogs - but you must be careful to prevent recursion by settings flags in the other dialog before moving it so it doesn't try to move the first one. The recursion could cause the delays and high CPU usage. Can you show the code that isn't working? Tony. From: interest-bounces+tony=rightsoft.com...@qt-project.org [mailto:interest-bounces+tony=rightsoft.com...@qt-project.org] On Behalf Of Sensei Sent: Friday, 28 June 2013 5:18 PM To: interest@qt-project.org Subject: [Interest] Glueing widgets together Dear all, I've posted some time ago a question about moving widgets simultaneously. However, the proposed solutions were unsatisfactory. That is probably because I've expressed my needs in a non useful way. So here it goes. I need to glue together two widgets, so that when one moves, the other *simultaneously* moves. They should appear glued even when dragging around, fast and slow. Like if the follower is simply painted over the moving widget. The proposed solutions involve getting the mouse move events dealt with. This resulted in a visible delay, and that isn't what I want: I don't want to see the window moving with the follower staying still, and after few instants, the follower (disappearing from where it was) painted in the right position. Is there any way I can achieve this visual effect? Thanks Cheers! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Masking an hidden widget (glitch?)
Dear all, I'm trying to avoid sub-classing a widget, because I don't really need it. However, I'd like to apply a mask to it, but I'm looking at a weird behavior. First of all, I don't know how I can apply a mask on a widget that is currently being created (and hidden). If I try to mask it, I get the geometry wrong. I think this is quite normal. So what I'm doing is to apply a mask whenever I show it. When I first click on the button that will show the widget, I see the frameless widget you see in the attachment on the left. Clicking again on the button you see in the picture, hides the widget, and behold the magic: clicking again shows it as I intended! You can see it on the right of the attachment. What am I doing wrong here? My code follows with an ugly patch: showing, maskin, hiding, and showing again! I am using Qt 4.8.4 (from homebrew) on OSX 10.8.4. Cheers! // Options button is activated void SubContainer::showFollower() { follower_-show(); // Follower width (fixed) int w = 300; // Follower height (there is a QVBoxLayout that handles this) int h = follower_-geometry().height(); // Set the mask to make it cool QPolygon mask; mask QPoint( 0, 10); mask QPoint( 10, 10); mask QPoint( 20,0); mask QPoint( 30, 10); mask QPoint( w, 10); mask QPoint( w,h); mask QPoint( 0,h); mask QPoint( 0, 10); follower_-setMask(QRegion(mask)); // UGLY AS HELL... follower_-hide(); follower_-show(); } attachment: wat.png___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] -optimized-qmake question
I was just compiling the new Qt 5.1rc, and I noticed that one of the configure options was -optimized-qmake, which is disabled by default. I was wondering why that was, or, more to the point, why WOULDN'T I want an optimized qmake? Isn't optimization a good thing? ---Israel BrewsterComputer SupportTechnician IIEra Alaska5245 Airport Industrial RdFairbanks, AK 99709(907) 450-7250 x7293---BEGIN:VCARD VERSION:3.0 N:Brewster;Israel;;; FN:Israel Brewster ORG:Frontier Flying Service;MIS TITLE:PC Support Tech II EMAIL;type=INTERNET;type=WORK;type=pref:isr...@frontierflying.com TEL;type=WORK;type=pref:907-450-7293 item1.ADR;type=WORK;type=pref:;;5245 Airport Industrial Wy;Fairbanks;AK;99701; item1.X-ABADR:us CATEGORIES:General X-ABUID:36305438-95EA-4410-91AB-45D16CABCDDC\:ABPerson END:VCARD ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest