Thanks, will have a go with this...
Thanks, will have a go with this...
Added after 50 minutes:
Perfect, thanks again. For anyone else interested, add a pixmap and painter variable to the gui's header file
private:
Ui::gui_brachy *ui;
private:
Ui::gui_brachy *ui;
QPixmap m_pixmap;
QPainter m_painter;
To copy to clipboard, switch view to plain text mode
then add the variables (+a file) like below, and add the line below the setupUi line
gui_brachy
::gui_brachy(QWidget *parent
) : ui(new Ui::gui_brachy),
m_pixmap("logo.jpg"),
m_painter(&m_pixmap)
{
ui->setupUi(this);
ui->label->setPixmap(m_pixmap);
}
gui_brachy::gui_brachy(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::gui_brachy),
m_pixmap("logo.jpg"),
m_painter(&m_pixmap)
{
ui->setupUi(this);
ui->label->setPixmap(m_pixmap);
}
To copy to clipboard, switch view to plain text mode
When I do this, even though the label's position is on the left in the editor, it loads the picture on the right and cuts off some of the image. Is there an autoscale function? And why does it move the label to the other side of the ui?
Bookmarks