Results 1 to 3 of 3

Thread: How to get a position of the menu bar item?

  1. #1
    Join Date
    Jan 2006
    Location
    Russia
    Posts
    50
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default How to get a position of the menu bar item?

    Actually I know y coordinate, but I can't find a way to get x coordinate.
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to get a position of the menu bar item?

    You should be able to retrieve the position by accessing the QMenu object from the bar and fetching its x() and y() coordinates and then mapping them to the coordinate space you require.

  3. #3
    Join Date
    Jan 2006
    Location
    Russia
    Posts
    50
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to get a position of the menu bar item?

    The task has been to show a widget like QMenu (I mean its positing ). I couldn't find a solution to get x coordinate directly. I found another solution ( it is inheritance from QMenu if it will be interesting for somebody) . None the less many thanks for the answer, wysota.
    Last edited by Mad Max; 20th November 2006 at 04:15. Reason: spelling error

Similar Threads

  1. Background image on popup menu item
    By MarkoSan in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th June 2006, 05:55
  2. Qt/MacOSX preferences menu item
    By mcenatie in forum Qt Programming
    Replies: 4
    Last Post: 14th March 2006, 04:24
  3. image for a custom menu Item.......
    By Naveen in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2006, 09:28
  4. Tracking separators in a menu (insertSeparator)
    By PrimeCP in forum Qt Programming
    Replies: 4
    Last Post: 25th January 2006, 18:10
  5. how change the QListBox item position by pixel
    By roy_skyx in forum Qt Programming
    Replies: 2
    Last Post: 20th January 2006, 01:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.