The Ultimate Qt Community site
Home News Forum Wiki Contest FAQ Links

Go Back   Qt Centre Forum > Qt > Qt Programming

Qt Programming General Qt programming issues.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10th May 2008, 02:25
smarinr smarinr is offline
Novice
 
Join Date: Apr 2008
Qt products used: Qt4
Qt platforms used: Windows
Posts: 22
Thanks: 9
Thanked 0 Times in 0 Posts
Exclamation Modify a ContextMenu
Related to: Qt4

Guys,
this one i'm not sure if it is easy...

See please the attachmment.

Somebody say to me that the menu I show is the contextMenu. By some reason if I set setWindowFlags(Qt::FramelessWindowHint) like this, the contextMenu is being disable on my application.

if somebody can let me see code or explain a little bit better HOW I DO THAT OVERRIDE of the contextMenu or if I'm wrong and that menu is not the contextMenu

thanks so much and hoping somebody show me a little bit of light
Attached Images
File Type: jpg FramelessWindowHint.jpg (28.5 KB, 16 views)

Reply With Quote
  #2  
Old 10th May 2008, 09:40
wysota wysota is offline
Guru
 
Join Date: Jan 2006
Location: Warsaw, Poland
Qt products used: Qt3, Qt4
Qt platforms used: Unix/X11, Windows
Posts: 11,590
Thanks: 3
Thanked 1,629 Times in 1,581 Posts
Default Re: Modify a ContextMenu

Why do you want to set a frameless window hint? The context menu is frameless out of the box. Try executing this snippet:
Qt Code:
  1. QMenu menu;
  2. menu.addAction("xyz");
  3. menu.addAction("abc");
  4. menu.exec(QCursor::pos());

Reply With Quote
  #3  
Old 10th May 2008, 18:31
smarinr smarinr is offline
Novice
 
Join Date: Apr 2008
Qt products used: Qt4
Qt platforms used: Windows
Posts: 22
Thanks: 9
Thanked 0 Times in 0 Posts
Default Re: Modify a ContextMenu

Quote:
Originally Posted by wysota View Post
Why do you want to set a frameless window hint?
is because im trying to bring up a dialog but my application when I bring it on, the dialog show me the frame and because of how the app looks like, is not elegant to see the frame up and disappear.... so... i just more for UI looks a little bit nice

Reply With Quote
  #4  
Old 10th May 2008, 18:33
wysota wysota is offline
Guru
 
Join Date: Jan 2006
Location: Warsaw, Poland
Qt products used: Qt3, Qt4
Qt platforms used: Unix/X11, Windows
Posts: 11,590
Thanks: 3
Thanked 1,629 Times in 1,581 Posts
Default Re: Modify a ContextMenu

What does the context menu have to do with it?

Reply With Quote
  #5  
Old 10th May 2008, 18:36
smarinr smarinr is offline
Novice
 
Join Date: Apr 2008
Qt products used: Qt4
Qt platforms used: Windows
Posts: 22
Thanks: 9
Thanked 0 Times in 0 Posts
Default Re: Modify a ContextMenu

I forgot to tell you somethiing

when you set the setWindowFlag to be frameless that context menu dont shows up when you right click on the app on the taskbar

its suppose to be very simple: restore, maximized, minimized and close

Reply With Quote
  #6  
Old 10th May 2008, 18:41
wysota wysota is offline
Guru
 
Join Date: Jan 2006
Location: Warsaw, Poland
Qt products used: Qt3, Qt4
Qt platforms used: Unix/X11, Windows
Posts: 11,590
Thanks: 3
Thanked 1,629 Times in 1,581 Posts
Default Re: Modify a ContextMenu

That's because your window manager ignores frameless windows - it doesn't manage them. Try finding a solution to your problem that doesn't involve frameless windows. Or live with an unmanaged window.

Reply With Quote
The following user says thank you to wysota for this useful post:
smarinr (10th May 2008)
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
contextmenu in QDockWidget title klipko Newbie 4 7th March 2008 23:32
I have a problem to modify table Abk Qt Programming 1 31st May 2007 21:11
contextmenu with MDI Thoosle Qt Programming 1 1st December 2006 08:29
Modify model data in QTreeView YuriyRusinov Qt Programming 6 26th October 2006 18:28
ContextMenu Naveen Qt Programming 9 21st February 2006 11:54


All times are GMT +1. The time now is 19:25.

Powered by vBulletin Version 3.7.1 Copyright ©2000 - 2008, Jelsoft Enterprises Ltd., vRewrite 1.5 SEOed URLs completed by Tech Help Forum and Chalo Na.
© 2006–2008 Qt Centre - The Ultimate Qt Community site
Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.