Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. menu
    Log in to post

    • SOLVED Qt menu looks "old" on Windows
      General and Desktop • qt5 windows menu menubar qt5.15.2 • • tontsa28  

      6
      0
      Votes
      6
      Posts
      65
      Views

      I took a look with the ListDLLs tool but couldn't actually find the plugin being used by the 32-bit version, maybe some other DLL is handling that? Anyway, my problem is now solved so I'll mark this topic as solved.
    • SOLVED How can I use MenuBar.insertMenu method in QML?
      QML and Qt Quick • qml menu menubar insertmenu • • X Grant  

      5
      0
      Votes
      5
      Posts
      223
      Views

      @LeLev Yes. I have created some menus statically, hide/show them manually. Thank you.
    • SOLVED MenuBar - why it doesn't work?
      General and Desktop • menu menubar begginer • • amy.cpp  

      5
      0
      Votes
      5
      Posts
      253
      Views

      Hi I think you action runs out of scope it seems to be local variable QAction actions[11]; and you take address of them so it does not copy but refernce inside the list listOfMenus[0].addAction(&actions[i]); but it looks to me like the actions[11]; lives in constructor and hence when Mainwindow is shown, they are all already deleted. Move the list to be a member of the class and see. Damn Pl45m4 beat me to it :)
    • UNSOLVED How to add an icon for submenu in Quick Controls 2?
      QML and Qt Quick • qml menu • • nland  

      4
      0
      Votes
      4
      Posts
      675
      Views

      @nland Did you ever figure this out?
    • UNSOLVED Contextual Menu in QML and Widget !
      QML and Qt Quick • qml widget menu qquickwidget contextual • • Renaud G.  

      3
      0
      Votes
      3
      Posts
      626
      Views

      @raven-worx Thanks, I will try that. I let you know if it works or not.
    • UNSOLVED How to create a menu using GraphicsScene with buttons
      Mobile and Embedded • qgraphicsscene qgraphicsitem menu • • mounipanditi  

      1
      0
      Votes
      1
      Posts
      495
      Views

      No one has replied

    • UNSOLVED Not to close Menu on MenuItem Click
      General and Desktop • button menu menuitem • • ars1614  

      5
      1
      Votes
      5
      Posts
      1445
      Views

      Just changing MenuItem to CheckBox does the job. Menu stays as long as you clicking CheckBox items: Menu { CheckBox { text: "Item A" checkable: true checked: false onCheckedChanged: { console.debug("item A", checked) } } CheckBox { text: "Item B" checkable: true checked: false onCheckedChanged: { console.debug("item B", checked) } } } This topic is still high in search results, so I think it would be helpful to post correct answer. Despite question is old it is still useful.
    • UNSOLVED QML ToolBarStyle hides Android Menu (Qt 5.5.1)
      Mobile and Embedded • qml android menu toolbarstyle • • bchimp  

      2
      0
      Votes
      2
      Posts
      959
      Views

      ok this appears to be the same problem as this: https://forum.qt.io/topic/57647/qml-change-toolbar-color-one-style-property-only not really "solved", but at least some pointers in that previous post.
    • UNSOLVED Switching menus
      General and Desktop • c++ menu • • mandruk1331  

      10
      0
      Votes
      10
      Posts
      6824
      Views

      @mandruk1331 QDialog already provides all the signals (accepted() and rejected()) and slots (accept() and reject()) you'd need. You only need to call accept() when you've checked that the login is successful (meaning in the button slot). See my example in post #1 how to connect them! As to the login dialog implementation, something like this: class MLogIn : public QDialog { Q_OBJECT public: explicit MLogIn(QWidget *parent = 0); ~MLogIn(); private slots: void on_pushButton_2_clicked(); void on_pushButton_clicked(); private: Ui::MLogIn *ui; }; void MLogIn::on_pushButton_2_clicked() { //< Try logging the user in if (loginSuccessful) accept(); else QMessageBox::warning("No such user/password"); }
    • UNSOLVED Switching between menu windows
      General and Desktop • c++ menu interface switch • • mandruk1331  

      2
      0
      Votes
      2
      Posts
      1549
      Views

      Hi, Please don't post the same question multiple times. Duplicate Closing this one.
    • SOLVED Set Mac Native Menus at Runtime
      General and Desktop • mac osx menu runtime • • maximo  

      4
      0
      Votes
      4
      Posts
      1349
      Views

      No, that's the native OS X menu so you can't modify it. Again: use the Info.plist file, it's also explained in QMenuBar's documentation
    • [solved] Large menu - reduce number of required functions
      General and Desktop • menu action • • Harry123  

      10
      0
      Votes
      10
      Posts
      2124
      Views

      @onek24 For the benefit of anyone finding this post, I found a much simpler solution for attaching information to a menu action : void QAction::setData(const QVariant & userData) QVariant QAction::data() const I currently prefer it over the much heavier solution of implementing a custom QAction class.
    • Menu not working in Ubuntu/Unity
      General and Desktop • ubuntu menu problem unity • • rstasta  

      2
      0
      Votes
      2
      Posts
      1347
      Views

      Hi and welcome to devnet, 2 things: Why this QString::fromUtf8(tr("XXX").toLatin1()) instead of tr("XXX") in QAction constructor ?? Why this mainWindow.menuBar()->addMenu(fileMenu); at the end ??
    • QtQuick 5.4 in QtCreator 5.5 Mac OS X 10.9.5: menuBar missing from template project on execute. What the???? [SOLVED]
      QML and Qt Quick • qtcreator qtquick menu menubar template qtbroken • • DooziiInc  

      9
      0
      Votes
      9
      Posts
      2858
      Views

      You're welcome ! SInce everything is OK now, please update the thread title prepending [solved] so other forum users may know a solution has been found :) Also, while browsing the forum, consider up-voting the answers that helped you, it will make them easier to find for other users :)
    • How to hide Menubar in Qt Quick Controls on Android?
      Mobile and Embedded • android menu menubar • • UniversE  

      1
      0
      Votes
      1
      Posts
      737
      Views

      No one has replied

    • tableview selection broken after dynamically populating context menu structure via createObject
      QML and Qt Quick • tableview selection menu createobject menuitem • • eagain  

      1
      0
      Votes
      1
      Posts
      1085
      Views

      No one has replied

    • [solved] QML Submenu
      QML and Qt Quick • qml menu submenue • • HappyCoder  

      3
      0
      Votes
      3
      Posts
      2684
      Views

      It's working fine, i was nesting the MenuItem entrys and that didn't work Stefan
    • Setting "hot keys" (or whatever they are called) for items in menus
      General and Desktop • menu shortcuts • • joeydonovan4  

      6
      0
      Votes
      6
      Posts
      1446
      Views

      It's not Qt specific and that's how Windows worked from the time it was invented. The accelerators are keyboard navigation aid and they are not shown unless you use keyboard.
    • QML Menu and EGLFS causes SIGABRT error
      Mobile and Embedded • qml qt5 eglfs menu • • PhTe  

      1
      0
      Votes
      1
      Posts
      649
      Views

      No one has replied

    • Menus freeze application temporarily
      QML and Qt Quick • menu • • Babalas  

      1
      0
      Votes
      1
      Posts
      646
      Views

      No one has replied

    • Menu not working
      General and Desktop • menu click • • A Former User  

      2
      0
      Votes
      2
      Posts
      978
      Views

      Maybe there's a widget that you didn't put into a layout? The default position of such widget is in the upper left corner and the 100px sound like some default size. Try adding this in your main: qApp->setStyleSheet("QWidget { border: 2px solid red;}"); This should put a red frame around every widget so you'll see if anything's there.
    • MenuBar focus. Propagate hover and press events.
      QML and Qt Quick • qml qtquick menu • • silex92  

      3
      0
      Votes
      3
      Posts
      1156
      Views

      @silex92 Perhaps you should post some code to try the scenario.
    • Qt Creator unreadable fonts
      The Lounge • qtcreator font text menu problem • • byT3b0N3  

      3
      0
      Votes
      3
      Posts
      1504
      Views

      ty, I have downgraded some packages (libglapi-mesa f.e.) and reinstalled some others. nopw everything is fine!
    • [Solved] QtQuick MenuBar Animation
      QML and Qt Quick • qtquick animation menu • • Sam2304  

      5
      0
      Votes
      5
      Posts
      2745
      Views

      It looks like there might be an easier mechanism to do this kind of thing with in the future. Rather than writing my own MenuBar from scratch, the Qt team have implemented styling support for most of their components. Whilst i haven't tried this yet (I'm stuck on a different part of my project at the moment), MenuBar Style should be perfect for what I was originally trying to acheive, by writing custom delegates, with the appropriate behaviours attached to their properties.
    • How to make menu shortcuts to be visible all the time?
      General and Desktop • menu shortcuts • • YuriQ  

      6
      0
      Votes
      6
      Posts
      2228
      Views

      @mcosta "Have rebuilt the same code with a different version of Qt?" - yes, I did it "Running both versions of the application on the same machine shows you different results??" - yes I guess something has changed in Qt sources since version 5.3 or 5.4. I hope this thing (to show menu shortcuts) is tweakable via Qt API.
    • Menu Button - Get rid of down arrow, anchor menu from top right corner
      General and Desktop • desktop menu toolbar material design • • mchouse  

      1
      0
      Votes
      1
      Posts
      821
      Views

      No one has replied