Hi,
I am using QT 4.3. I nned to create a toolbar. So I create the code like this.
================================================== =================
QToolBar *bar = new QToolBar("main", this);
pButton[pbt_ctl_size ] = new QToolButton;
pButton[pbt_ctl_size ]->setIcon(QPixmap((const char **)ctl_size_xpm));
pButton[pbt_ctl_size ]->setToolTip("Size and framerate");
connect(pButton[pbt_ctl_size ], SIGNAL(clicked()), pVideo, SLOT(ShowFormatDialog()));
pButton[pbt_ctl_size ]->setCheckable(true);
pButton[pbt_ctl_size ]->setEnabled(true);
bar->addWidget(pButton[pbt_ctl_size ]);
pButton[pbt_ctl_video ] = new QToolButton;
pButton[pbt_ctl_video]->setIcon(QPixmap((const char **)ctl_video_xpm));
pButton[pbt_ctl_video]->setToolTip("Video adjustments");
connect(pButton[pbt_ctl_video ], SIGNAL(clicked()), pVideo, SLOT(ShowFormatDialog()));
pButton[pbt_ctl_video]->setEnabled(true);
bar->addWidget(pButton[pbt_ctl_video ]);
================================================== ===========================
after this code QT display a toolbar and two icons in my window. But it is not activate. If any error in this code? How can I use the click event of this toolbar?
Please help me....
Bookmarks