Questions tagged [qtoolbar]

The QToolBar class, part of the Qt framework, provides a movable panel that acts as a container for a set of controls.

Documentation can be found here (Qt4) and here (Qt5).

108 questions
0
votes
0 answers

removing white separator form between QMenu and QToolBar

I have written QMenu and QToolBar in Qt. That's what I got: I can't find any way to remove this white separator between QMenu(File, Edit) and QToolBar(Two buttons with piano icons). Code: MainWindow::MainWindow() { …
Lizard_Paszczyk
  • 149
  • 1
  • 16
0
votes
1 answer

How to change the icon of a QAction Qt on mouse hover in QToolBar element in qt?

I have some QActions in my QToolBar. QAction doesn't have any stylesheets, so I am trying to change the QAction icon on mouse hover. how can I change the QAction icon on mouse hover
Rishabh Bansal
  • 51
  • 1
  • 1
  • 9
0
votes
1 answer

QToolBar children list always growing. Qt memory leak?

I would like to have only one QToolBar instance and modify it many times during the execution of my application. However, I'm concerned about the memory management done by Qt. Consider the following: QToolBar toolBar; std::cout <<…
Marco
  • 131
  • 1
  • 8
0
votes
1 answer

Add some text to a QToolBar

I am having trouble adding some text in a QToolBar. I can only add Actions. Also I have two actions with their rerspectives icons in my QToolBar but I want to separate them and I can´t either. My newbie approach was to add empty actions to simulate…
Renato Sanhueza
  • 534
  • 7
  • 27
0
votes
2 answers

Always show second line in QToolbar

Actual Behaviour I ordered my toolbars in the top area in two lines, something like MyMainWindow::init() { addToolBar(Qt::TopToolBarArea, m_toolbar_1); addToolBar(Qt::TopToolBarArea, m_toolbar_2); addToolBarBreak(Qt::TopToolBarArea); …
mfuchs
  • 2,190
  • 12
  • 20
0
votes
1 answer

Qt5 get native Windows toolbar style

Most of Qt widgets looks like a native widget on Windows but not the QToolBar. How to make QToolBar looks like a native Windows toolbar?
Antonio Dias
  • 2,751
  • 20
  • 40
0
votes
1 answer

Qtoolbar toggle show hide on Qmenu

How to add slot to toggle show and hide the toolbar in qmenu? This my code: #include "mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { setMinimumSize(800, 600); CreateAct(); CreateMenus(); …
0
votes
1 answer

QToolBar : Displaying the menu when toolbutton is pressed - DownArrow Issue

I currently have something like this in my code: QMenu *mabout = new QMenu("About"); QToolButton* tb_about = new QToolButton(); QAction *test= new…
MistyD
  • 16,373
  • 40
  • 138
  • 240
0
votes
1 answer

How to setup QToolBar's background image?

//MainWindow.cpp MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { //... QToolBar * toolbar = new QToolBar(this); this->addToolBar(Qt::BottomToolBarArea, toolbar); toolbar->setMovable(false); QToolButton * button…
CCC
  • 2,164
  • 8
  • 27
  • 47
0
votes
2 answers

Outlook shortcuts style toolbar in Qt

Is there any way to create outloook shortcuts style toolbar in Qt? Should use normal toolbar and try to style it somehow (I have little idea how to achieve this)? Or does Qt provide builtin widget for this? I am talking about toolbar like on this…
gruszczy
  • 40,948
  • 31
  • 128
  • 181
0
votes
2 answers

QToolButtons Not-Flat Button Style

I am using Qt Widgets version 4.8. I am placing QAction objects into a QToolBar. I am displaying text only, no icons. The text appears flat with no outline, until one hovers over the text, and then the text appears as a button. I would prefer to…
JeffB
  • 1
  • 1
0
votes
2 answers

Qt toolbar/qtoolbutton action never triggered

I have the following piece of code, for some reason, from the UI window, MyActionDock inherited from QToolBar, it is displayed without any problem, when clicked on the button, the button color also changed, but the slots (a1ActionSlot(), and…
0
votes
1 answer

How to set a tool bar between two others

I have multiple tool bars that are all next too each other. I want the toolbar that is first to be third or before another. I can not figure out how to make it happen. Could anyone help? here is what is in my .cpp QPixmap pix(16, 16); …
Zach Starnes
  • 3,108
  • 9
  • 39
  • 63
0
votes
1 answer

QToolbar not visible before 2nd call of show / setVisible(true)

I'm facing some kind of mystery : if( itemSelectionne->parentItem()->type() == NodeType) { ((GraphicsScene*) this->scene())->unselectAll(); itemSelectionne->parentItem()->setSelected(true); //Coordinate of my toolbar, works fine …
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
-1
votes
4 answers

QPushButton not blinking

Inspired by Label on QToolBar, possible? I'm trying to develop it. But my button do not blink on click, why? I see in the other app looks like the button color gets gray during the click (while pressed) and the normal button gets blue. But my button…
KcFnMi
  • 5,516
  • 10
  • 62
  • 136