hbQT - Post queries in this thread only

Moderator: Rathinagiri

User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: hbQT - Post queries in this thread only

Post by Rathinagiri »

Roberto, can you update with the new HBQT code?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: hbQT - Post queries in this thread only

Post by Roberto Lopez »

rathinagiri wrote:Roberto, can you update with the new HBQT code?
I must prepare new binaries for both (Windows and Linux) from the modified sources.

I'll try to do it ASAP.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
bedipritpal
Posts: 122
Joined: Thu Sep 02, 2010 10:47 pm

Re: hbQT - Post queries in this thread only

Post by bedipritpal »

Roberto Lopez wrote:Pritpal,

Various users (and me) verified that images are not working in menus under Ubuntu 10.4.

It can be verified on demoqt.
I am not a user of Linux so cannot comment.

Post your relevant code here and let me analyze how it can be done in different way.
Hopefully we will get to the problem.
enjoy hbIDEing... Pritpal Bedi
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: hbQT - Post queries in this thread only

Post by Roberto Lopez »

bedipritpal wrote:
Roberto Lopez wrote:Pritpal,

Various users (and me) verified that images are not working in menus under Ubuntu 10.4.

It can be verified on demoqt.
I am not a user of Linux so cannot comment.

Post your relevant code here and let me analyze how it can be done in different way.
Hopefully we will get to the problem.
Thanks for your answer.

There is no special code. It is simply demoqt with Harbour built from current (a couple of days ago) sources.

The same works perfect on Windows.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: hbQT - Post queries in this thread only

Post by Roberto Lopez »

Pritpal,

I'm trying to print based on a millimeters coordinates system.

I've found a solution, but is C++ based.

The problem is that I can't figure out how the following code can be translated to HBQT:

Code: Select all

painter.device()->physicalDpiX()
were 'painter' is a QPaniter object.

Thanks in advance.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
bedipritpal
Posts: 122
Joined: Thu Sep 02, 2010 10:47 pm

Re: hbQT - Post queries in this thread only

Post by bedipritpal »

Roberto Lopez wrote:Pritpal,

I'm trying to print based on a millimeters coordinates system.

I've found a solution, but is C++ based.

The problem is that I can't figure out how the following code can be translated to HBQT:

Code: Select all

painter.device()->physicalDpiX()
were 'painter' is a QPaniter object.

Thanks in advance.
Try:

Local qPaintDevice

qPaintDevice := QPaintDevice():from( painter:device() )
nDpiX := qPaintDevice:physicalDpiX()
enjoy hbIDEing... Pritpal Bedi
User avatar
bedipritpal
Posts: 122
Joined: Thu Sep 02, 2010 10:47 pm

Re: hbQT - Post queries in this thread only

Post by bedipritpal »

Roberto Lopez wrote: There is no special code. It is simply demoqt with Harbour built from current (a couple of days ago) sources.
The same works perfect on Windows.
Try:

oActNew := QAction():new( oMenu1 )
oActNew:setText( "&New" )
oActNew:setIcon( "new.png" )
oActNew:connect( "triggered(bool)", {|w,l| FileDialog( "New" , w, l ) } )
oMenu1:addAction_4( oActNew )
enjoy hbIDEing... Pritpal Bedi
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: hbQT - Post queries in this thread only

Post by Roberto Lopez »

Pritpal,

Thanks for your answers.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
bedipritpal
Posts: 122
Joined: Thu Sep 02, 2010 10:47 pm

Re: hbQT - Post queries in this thread only

Post by bedipritpal »

Roberto Lopez wrote:Pritpal,

Thanks for your answers.
It is not enough.
Did they work ?
enjoy hbIDEing... Pritpal Bedi
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: hbQT - Post queries in this thread only

Post by Roberto Lopez »

bedipritpal wrote:
Roberto Lopez wrote:Pritpal,

I'm trying to print based on a millimeters coordinates system.

I've found a solution, but is C++ based.

The problem is that I can't figure out how the following code can be translated to HBQT:

Code: Select all

painter.device()->physicalDpiX()
were 'painter' is a QPaniter object.

Thanks in advance.
Try:

Local qPaintDevice

qPaintDevice := QPaintDevice():from( painter:device() )
nDpiX := qPaintDevice:physicalDpiX()
Its working fine. It returns the correct DPIs for the printer.

A little suggestion:

Since QT official reference samples (and most of those we can find on the web) are C++ based, could be very useful if you could write a small HOWTO file, explaining how to handle certain situations when the translation of the code is not obvious for a Harbour/xBase programmer without C++ knowledge.

Thanks.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply