Need help, i want know how i mus do to see in main window piece of paper
Need help, i want know how i mus do to see in main window piece of paper like in office word
Re: Need help, i want know how i mus do to see in main window piece of paper
It is hard to understand what you are asking. Microsoft Office does not display "paper", it displays the formatted contents of documents. Maybe the Text Edit example from the Qt distribution might give you some help. If you want to display the image of a page you have scanned into your computer, then the Image Viewer example might be helpful.
Re: Need help, i want know how i mus do to see in main window piece of paper
If it is a matter of one single paper (as you call it so), put the paper widget in a layout and set the layout margins accordingly.
Re: Need help, i want know how i mus do to see in main window piece of paper
I would like it to look exactly like in the microsoft word
when the end of the card and the other is starting, I do not know how to write such leyout with margins
1 Attachment(s)
Re: Need help, i want know how i mus do to see in main window piece of paper
Here is an example
Attachment 12508
Code:
#include <QtWidgets>
{
public:
explicit PageLayout
(QWidget * parent
= 0) {
pal.
setColor(QPalette::Background, Qt
::darkGray);
setPalette(pal);
setAutoFillBackground(true);
mLayout->setMargin(20);
mLayout->setSpacing(20);
}
{
page->setAutoFillBackground(true);
page
->setFixedSize
(QSize(100,
100));
mLayout->rowCount();
mLayout->addWidget(page, mLayout->rowCount() + 1, 0, 1, 1, Qt::AlignCenter);
}
private:
};
int main(int argc, char *argv[])
{
PageLayout layout;
layout.
addPage(new QLabel("Page 1"));
layout.
addPage(new QLabel("Page 2"));
layout.
addPage(new QLabel("Page 3"));
layout.
addPage(new QLabel("Page 4"));
layout.show();
return a.exec();
}