Hi to all,
I trying to write my PanelInfo inherited from QWidget on top of my WaveWidget.
Basically I show it only when needed ( pressing a button ).
The strange thing is that when set as visible it's shown as transparent instead of opaque.
Here I write some code. In the WaveWidget ctor I create it and I place where I want:
m_panel = new PanelInfo(this);
m_panel->move(400,0);
m_panel->resize(100,100);
m_panel->setVisible(false); // Initially I don't want show it
m_panel = new PanelInfo(this);
m_panel->move(400,0);
m_panel->resize(100,100);
m_panel->setVisible(false); // Initially I don't want show it
To copy to clipboard, switch view to plain text mode
than I have a button that should show the little panelinfo in the released signal:
connect( m_showPanelBtn, SIGNAL( released() ), this, SLOT( onShowInfoPanel() ) );
connect( m_showPanelBtn, SIGNAL( released() ), this, SLOT( onShowInfoPanel() ) );
To copy to clipboard, switch view to plain text mode
and finally the code to show it:
void WaveWidget::onShowInfoPanel()
{
if( !m_panel->isVisible() )
m_panel->setVisible(true);
}
void WaveWidget::onShowInfoPanel()
{
if( !m_panel->isVisible() )
m_panel->setVisible(true);
}
To copy to clipboard, switch view to plain text mode
The problem is that the panel is shown completely transparent and I see the other widget that are placed beside it ( see the image ).panelInfo.jpg
I also tried to set the opacity to 1.0 but nothing change. How can I do to show it opaque and not transparent?
Best Regards
Bookmarks